summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/ui/cmdline2_spec.lua
AgeCommit message (Collapse)AuthorFiles
2026-04-22fix(cmdline): avoid 'incsearch' recursion after redraw #39303luukvbaal1
Problem: A vim.ui_attach() callback that redraws to show a 'verbose' regex message during 'incsearch' results in recusive redrawing. Solution: Check that curwin was redrawn instead of just any window when determining if 'incsearch' highlighting was cleared.
2026-04-06fix(cmdline): 'inccommand' preview after setcmdline() #38795luukvbaal1
Problem: 'inccommand' preview is not executed after setcmdline(), and as a result cmdline_show event is emitted when redrawing is not allowed (5b6477be). Solution: Call command_line_changed() when ccline.cmdbuff_replaced is set (by setcmdline()).
2026-03-31fix(cmdline): redraw cmdline after empty message (#38485)luukvbaal1
Problem: Cmdline is not redrawn after an empty message clears it. Remembered last drawn cursor position may be outdated but equal to the current cmdline content with UI2. Solution: Ensure cmdline is redrawn after an empty message clears it. Compare wanted cursor position with actual cursor position.
2026-03-06fix(ui2): only highlight Ex command lines in the cmdline #38182luukvbaal1
Problem: Prompts and message text (in block mode) in the cmdline are parsed and highlighted as if it is Vimscript. Entering the cmdline while it is expanded can work more like it does with UI1, where the press enter prompt is replaced and previous messages stay on the message grid, while subsequent messages are placed below it. Solution: Highlight manually with string parser on lines starting with ':'. Spoof cmdline block mode when the cmdline is entered while it is expanded.
2026-02-24fix(ui2): multiline/color replaced message, expanded cmdline, error messages ↵luukvbaal1
#38044 Problem: - Unintentionally inserting lines for a replaced multiline message that also has multiple highlights. - Scheduled check to see if the expanded cmdline window was entered makes it difficult to keep track of what happens when the key pressed to dismiss it results in a message. - Reading the first line of an error message should be enough notice for something going wrong. - "search_cmd" messages should not be shown with 0 'cmdheight'. - Unable to configure dynamically changed pager height. - Enabling UI2 doesn't make sense with no UIs attached. Solution: - Only insert a line for the first chunk after a newline. - Use getmousepos() to check if the expanded cmdline was clicked to enter the pager. entering the pager to serve as a configuration interface. - Don't expand the cmdline for error messages; user can press g<. - Don't show "search_cmd" messages with 'cmdheight' set to 0. - Change 'eventignorewin' to ensure WinEnter is fired when - Have enable() return early when no UIs are attached.
2026-02-24fix(messages): unwanted ext_messages newlines for confirm() #38045luukvbaal1
Problem: Newlines emitted with ext_messages intended to position the message/prompt on the message grid. Solution: Don't emit these newlines with ext_messages, followup to 4260f73e.
2026-02-05fix(ui2): always route to dialog when cmdline is open #37730luukvbaal1
Problem: Messages emitted while cmdline is open are not shown with cmdline message target. Solution: Route to dialog window when cmdline is open.
2026-02-05refactor: rename _extui => _core.ui2 #37692luukvbaal1
Problem: _extui module name is confusing and should eventually end up in _core/. Solution: Move it there and name it ui2.
2026-02-04fix(ui2): don't adjust dialog pos for pum wildmenu (#37695)Sean Dewar1
Problem: Dialog position unnecessarily adjusted for pum wildmenu. Solution: Apply no offset if the pum is visible.
2026-02-03fix(ui2): wildmenu hidden behind dialog window #37684luukvbaal1
Problem: The wildmenu is hidden behind the dialog window with "list" in 'wildmode'. Global ('laststatus' set to 3) statusline is hidden behind the pager window. Solution: Check wildmenumode() to adjust the dialog position when necessary. Ensure pager is positioned above the global statusline with 'laststus' set to 3.
2026-01-29fix(ui): no empty message for substitution match with ext_messages #37600luukvbaal1
Problem: Empty message is emitted when a match is found. Solution: Don't emit it with ext_messages enabled.
2026-01-26fix(ui): only internal messages are unsafe #37462luukvbaal1
Problem: Fast context for msg_show event inhibits vim.ui_attach from displaying a stream of messages from a single command. Solution: Remove fast context from msg_show events emitted as a result of explicit API/command calls. The fast context was originally introduced to prevent issues with internal messages.
2025-12-01fix(ui): exclude hidden windows from tabline window count #36779benarcher26911
Problem: When `vim._extui` is enabled, the default tabline shows an incorrect window count (e.g., "2" when only 1 window is visible). This happens because the extui pager window has `focusable=true` (needed for user interaction) but `hide=true` (not visible by default). Solution: Modify the window counting logic in `statusline.c` and `ex_docmd.c:ex_tabs()` to also exclude hidden windows (`wp->w_config.hide`), not just non-focusable windows. Also updates test expectations in `cmdline2_spec.lua` which previously expected the incorrect window count "2" when extui was enabled. The test now correctly expects no window count indicator when only 1 visible window exists. Fixes #36759
2025-11-08fix(ui): cmdline_show is not fired after clearing the screen (#36451)luukvbaal1
Problem: Resize events during startup may clear an active external cmdline, which is then not redrawn. UI2 VimResized autocommand does not work. UI2 message appearance may be altered by inherited window options. The message separator uses the wrong fillchar. Solution: Unset cmdline_was_last_redrawn when clearing the screen, such that cmdline_show is re-emitted. Ensure set_pos function is called without arguments. Ensure such options are unset. Use 'fillchars'->msgsep.
2025-10-24fix(ui): ignore textlock for vim.ui_attach() callbacks #36278luukvbaal1
Problem: vim.ui_attach() callbacks may run into E565 textlock errors. Solution: Changing text in UI buffers must be safe; assume it is.
2025-10-22fix(ui2): start treesitter after deleting cmdline buffer (#36274)luukvbaal1
Problem: Treesitter is not started in new cmdline buffer after deletion. Solution: Start treesitter when highlighter buffer no longer matches.
2025-08-27fix(extui): error on :call input('') (#35515)phanium1
Problem: Error on empty string prompt. Solution: (prompt .. '\n'):gmatch('(.-)\n').
2025-06-27feat(extui): don't enter pager for routed message #34679luukvbaal1
Problem: Messages routed to the pager to be shown in full, enter the pager automatically, yielding another "press-q-prompt". Solution: Only enter the pager when requested explicitly. Otherwise, close the pager on the next typed mapping, unless that mapping entered the pager.
2025-06-24fix(cmdline): validate 'incsearch' cursor for "cmdline_show" redraw (#34630)luukvbaal1
Problem: "cmdline_show" event may be emitted with an invalid cursor position, causing a redraw that will clear the match highlight. Solution: Mark the cursor position as valid so that a "cmdline_show" callback that updates the screen does not clear the match highlight.
2025-06-24fix(autocmd): 'cmdheight' OptionSet with valid window grids (#34619)luukvbaal1
Problem: OptionSet autocmd emitted with invalid grids after entering tabpage with different 'cmdheight'. Solution: First call `tabpage_check_windows()` before changing 'cmdheight'. Add a test that exercises the `vim._extui` cmdline.