summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_extui/shared.lua
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2025-06-08 16:05:44 +0200
committerluukvbaal <luukvbaal@gmail.com>2025-06-13 14:28:01 +0200
commit76f76fb0839100087093fe2d0897018193d526e4 (patch)
tree8e12faed6132b735ba6106d94661c5c25bdaa2e9 /runtime/lua/vim/_extui/shared.lua
parent3e303231350eff7c8326f9e04dbbb0177b188258 (diff)
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.
Diffstat (limited to 'runtime/lua/vim/_extui/shared.lua')
-rw-r--r--runtime/lua/vim/_extui/shared.lua2
1 files changed, 1 insertions, 1 deletions
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', '<Cmd>wincmd c<CR>', {})