summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_core/ui2/cmdline.lua
AgeCommit message (Collapse)AuthorFiles
2026-03-31fix(ui2): flicker when entering pager from expanded cmdline #38639luukvbaal1
Problem: 'showcmd' causes flickering when pressing "g<" to enter the pager when the cmdline is expanded for messages. Initial keypress for an incomplete mapping is not giving 'showcmd' feedback while cmdline is expanded for messages (which is only dismissed upon the vim.on_key callback after 'timeoutlen'). Solution: Delay dismissing expanded cmdline when vim.on_key() callback receives "g". Place 'showcmd' "last" virtual text during expanded cmdline.
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-24fix(ui2): show messages in dialog window when entering expanded cmdline #38465luukvbaal1
Problem: - With expanded messages exceeding cfg.msg.cmd.height, entering the cmdline scrolls to the bottom and expands to the full "cmd" buffer text height. - Cursor in the pager is not always at the last message and at the bottom of the window when appending to the pager. - unreliable test: messages2_spec: "closed msg window timer removes empty lines". Solution: - Achieve separation of the cmdline and message text by moving messages to the dialog window when entering the cmdline below expanded messages. - Set cursor to start of the first message only when first entering the pager. Use `norm! zb` to position last message at the bottom of the window (which shouldn't crash anymore since 911337eb). - Increase cfg.msg.msg.timeout used in the test file.
2026-03-12fix(ui2): use pager to list consecutively typed commands #38272luukvbaal1
Problem: Mimicked block mode for cmdline entered while expanded does not work intuitively for repeated commands yielding messages exceeding the screen height. The expanded cmdline resizes and scrolls to bottom/top when appending a message and entering the cmdline. Also includes the entered command, as opposed to the UI1 behavior. Crash when scrolling to bottom of pager due to recursive uv_run after shell message callback executes `nvim_command()` with 'showcmd'. Solution: Still mimic block mode when entering the expanded cmdline, but when the entered command emits a message open the pager with the current message content in the expanded cmdline. Always route typed commands to the pager when it is open. Use `nvim_buf_set_cursor()` instead of `nvim_command()`.
2026-03-07fix(ui2): ensure expanded cmdline is closed after :<Esc> (#38187)luukvbaal1
Problem: Expanded cmdline is left open after entering the cmdline again without entering a command that emits another message (after 301c7065). Solution: Wait for msg_show to reinstate the vim.on_key() handler. If there was no message close the expanded cmdline.
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-16fix(ui2): only set dialog on_key callback once #37905luukvbaal1
Problem: vim.on_key() called for each message while cmdline is open. Cursor is on a seemingly random column when pager is entered. Entering the pager while the cmdline is expanded can be more convenient than pressing "g<". Pager window is unnecessarily clamped to half the shell height. Setting 'laststatus' while pager is open does not adjust its dimensions. Solution: Only call vim.on_key() once when dialog window is opened. Ensure cursor is at the start of the first message when entering the pager. Enter the pager window when "<CR>" is pressed while the cmdline is expanded. Don't clamp the pager window height. Set message windows dimensions when 'laststatus' changes.
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.