summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_extui/shared.lua
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2025-06-01 20:54:38 +0200
committerGitHub <noreply@github.com>2025-06-01 20:54:38 +0200
commitff95d7ff9a04150ca988e070c8c1aa65b86d54fc (patch)
treefea45e04600c53f8bb712d071e6e7cb7631ba48e /runtime/lua/vim/_extui/shared.lua
parentb95189b7e34a458f09454cff8001ed06df377704 (diff)
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.
Diffstat (limited to 'runtime/lua/vim/_extui/shared.lua')
-rw-r--r--runtime/lua/vim/_extui/shared.lua3
1 files changed, 2 insertions, 1 deletions
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