summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_core/ui2.lua
AgeCommit message (Collapse)AuthorFiles
2026-04-20fix(ui2): don't dismiss expanded messages for non-typed key #39247luukvbaal1
Problem: Invalid check for non-typed key to dismiss expanded cmdline. Unable to delay the timer that removes a message from the msg window. Solution: Check for empty string instead of nil to determine whether a key is typed. Restart the timer if it expires while the user is in the msg window. Allow entering the msg window with a mouse click.
2026-04-20fix(ui2): ensure msg window is visible after closing tabLuuk van Baal1
Problem: After closing a tabpage while the msg window is showing a message, it is hidden while the msg window still contains a message. Solution: Unhide the msg window after entering a tabpage and it still contains a message. Co-authored-by: Linykq <yukunlin590@gmail.com>
2026-04-19feat(options): add 'winpinned' to pin a window #39157luukvbaal1
Problem: - Unable to "pin" a window to prevent closing without specifically being targeted. - :fclose closes hidden windows (even before visible windows). Solution: - Add 'winpinned' window-local option. When set, window is skipped by :fclose and :only. Pin the ui2 cmdline window (which should always be visible), so that it is not closed by :only/fclose. - Skip over hidden (and pinned) windows with :fclose. Co-authored-by: glepnir <glephunter@gmail.com>
2026-03-30fix(ui2): allow empty argument for enable() #38605Christian Clason1
Problem: `vim._core.ui2.enable` requires passing an empty table for default options, unlike other (native) Lua API. Solution: Initialize `opts` with empty table if `nil` is passed.
2026-03-28docs: news #38464Justin M. Keyes1
2026-03-26fix(ui2): ENTER may focus pager in insert/terminal mode #38497phanium1
fix(ui2): prevent <CR> from focusing pager in insert/terminal mode Problem: <CR> in insert/terminal mode can focus pager unexpectedly. Solution: Don't enter the pager when <CR> is pressed during expanded cmdline in insert/terminal mode.
2026-03-24docs: api, plugins, ui2Justin M. Keyes1
2026-03-21feat(ui2): configure maximum window heights #38392luukvbaal1
Problem: - Window height is set dynamically to match the text height, making it difficult for the user to use a different height. - Cmdwin is closed to enter the pager but still taken into account for the pager position, and not restored when the pager is closed. - Dialog pager handler may unnecessarily consume <Esc>. Solution: - Add maximum height config fields for each of the UI2 windows, where a number smaller than one is a fraction of 'lines', absolute height otherwise (i.e. `cfg.msg.pager.height = 0.5`). - If the cmdwin will be closed to enter the pager, don't try to position the pager above it. Re-enter the cmdwin when the pager is closed. - Only add vim.on_key() handler for the dialog paging is actually possible.
2026-03-19fix(ui2): move windows to current tabpageLuuk van Baal1
Problem: Windows are closed and re-opened after changing tabpage (and might be removed from the current tabpage after 094b297a). Solution: Ensure windows are on the current tabpage by moving them.
2026-03-11docs: deprecate hit-enterJustin M. Keyes1
2026-03-11docs: api, messages, lsp, trustJustin M. Keyes1
gen_vimdoc.lua: In prepare for the upcoming release, comment-out the "Experimental" warning for prerelease features.
2026-03-10Merge #37926 msg_show UI event indicates user-interactiveJustin M. Keyes1
2026-03-06fix(ui2): immediately open target windows on new tabpage (#38170)luukvbaal1
Problem: Previous tests for this relied on other events opening the targets, which are not guaranteed to happen. Solution: Open target windows when entering a new tabpage.
2026-03-04feat(ui2): support routing "typed_cmd" trigger to targetLuuk van Baal1
Problem: Unable to immediately open a typed command in the pager. Solution: Support mapping msg_show "typed_cmd" trigger in cfg.msg.targets (e.g. `targets = { typed_cmd = 'pager' }`).
2026-02-28feat(ui2): configure targets per message kind #38091luukvbaal1
Problem: Unable to configure message targets based on message kind. Solution: Add cfg.msg.targets mapping message kinds to "cmd/msg/pager". Check the configured target when writing the message. cfg.msg = { target = 'cmd', targets = { progress = 'msg', list_cmd = 'pager' } } will for example use the 'msg' target for progress messages, immediately open the pager for 'list_cmd' and use the cmdline for all other message kinds.
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-17fix(ui2): don't change configured message target implicitly #37924luukvbaal1
Problem: Implicitly setting message target when 'cmdheight' changes. Solution: Just use the user configured target. Support "cmd" target with 'cmdheight' set to 0.
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-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.