From ff95d7ff9a04150ca988e070c8c1aa65b86d54fc Mon Sep 17 00:00:00 2001 From: luukvbaal Date: Sun, 1 Jun 2025 20:54:38 +0200 Subject: fix(extui): adjust "more" window routing (#34251) Problem: Message lines from multiple message events that end up spilling 'cmdheight' end up spread out over the cmdline and "more" window. Messages emitted as feedback to a typed :command (rather than its sole purpose like :echo/:=) are routed to the more window. The more window isn't closed when entering the cmdwin, and doesn't allow `vim.hl.on_yank()`. Solution: When first opening the "more" window for spilled messages, move the message buffer to the more window. Restrict routing of typed commands to echo kinds. Ignore all events but WinLeave and TextYankPost. --- runtime/lua/vim/_extui/shared.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/lua/vim/_extui/shared.lua') diff --git a/runtime/lua/vim/_extui/shared.lua b/runtime/lua/vim/_extui/shared.lua index 9821e761a7..ff70dd7eb6 100644 --- a/runtime/lua/vim/_extui/shared.lua +++ b/runtime/lua/vim/_extui/shared.lua @@ -88,7 +88,8 @@ function M.tab_check_wins() api.nvim_set_option_value('smoothscroll', true, { scope = 'local' }) local ft = type == 'cmd' and 'cmdline' or ('msg' .. type) api.nvim_set_option_value('filetype', ft, { scope = 'local' }) - api.nvim_set_option_value('eventignorewin', 'all', { scope = 'local' }) + local ignore = 'all' .. (type == 'more' and ',-WinLeave,-TextYankPost' or '') + api.nvim_set_option_value('eventignorewin', ignore, { scope = 'local' }) end) end end -- cgit v1.3-3-g829e