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.
This commit is contained in:
luukvbaal
2025-06-01 20:54:38 +02:00
committed by GitHub
parent b95189b7e3
commit ff95d7ff9a
3 changed files with 31 additions and 23 deletions

View File

@@ -110,10 +110,8 @@ function M.enable(opts)
end
end
if vim.v.vim_did_enter == 1 then
ext.tab_check_wins()
check_opt('cmdheight', vim.o.cmdheight)
end
ext.tab_check_wins()
check_opt('cmdheight', vim.o.cmdheight)
api.nvim_create_autocmd('OptionSet', {
group = ext.augroup,