From 5e83d0f5ad4a3214d26e15eaecf675f55412ca18 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Mon, 2 Jun 2025 07:09:19 +0200 Subject: fix(extui): reposition "more" window after entering cmdwin Problem: Closing the "more" window for an entered cmdwin in ff95d7ff9 still requires special casing to properly handle "more" visibility. Solution: Reposition the "more" window instead; anchoring it to the cmdwin. --- runtime/lua/vim/_extui/shared.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 ff70dd7eb6..31a4f2dd52 100644 --- a/runtime/lua/vim/_extui/shared.lua +++ b/runtime/lua/vim/_extui/shared.lua @@ -65,7 +65,7 @@ function M.tab_check_wins() anchor = type ~= 'cmd' and 'SE' or nil, hide = type ~= 'cmd' or M.cmdheight == 0 or nil, title = type == 'more' and 'Messages' or nil, - border = type == 'box' and not o.termguicolors and 'single' or border or 'none', + border = type == 'box' and 'single' or border or 'none', -- kZIndexMessages < zindex < kZIndexCmdlinePopupMenu (grid_defs.h), 'more' below others. zindex = 200 - (type == 'more' and 1 or 0), _cmdline_offset = type == 'cmd' and 0 or nil, @@ -88,7 +88,7 @@ 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' }) - local ignore = 'all' .. (type == 'more' and ',-WinLeave,-TextYankPost' or '') + local ignore = 'all' .. (type == 'more' and ',-TextYankPost' or '') api.nvim_set_option_value('eventignorewin', ignore, { scope = 'local' }) end) end -- cgit