From 76f76fb0839100087093fe2d0897018193d526e4 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Sun, 8 Jun 2025 16:05:44 +0200 Subject: fix(extui): only append messages exceeding 'cmdheight' to "more" Problem: 8defe1a declared the "more" window the most convenient place to route messages to if it is already open for msg.pos == 'cmd'. In usage, this doesn't appear to be the case. Appending messages as added in that commit is still useful, but should only be done for messages that spill 'cmdheight'. Solution: Only append messages exceeding 'cmdheight' to the more window. To do this, instead of immediately writing to the more buffer, write to the cmd buffer and calculate its height. Then copy the text and its highlights to the more buffer. --- runtime/lua/vim/_extui/shared.lua | 2 +- 1 file changed, 1 insertion(+), 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 c142994334..8c50e82578 100644 --- a/runtime/lua/vim/_extui/shared.lua +++ b/runtime/lua/vim/_extui/shared.lua @@ -77,7 +77,7 @@ function M.tab_check_wins() end if setopt then - api.nvim_buf_set_name(M.bufs[type], 'vim._extui.' .. type) + api.nvim_buf_set_name(M.bufs[type], 'nvim.' .. type) if type == 'more' then -- Close more window with `q`, same as `checkhealth` api.nvim_buf_set_keymap(M.bufs.more, 'n', 'q', 'wincmd c', {}) -- cgit