From 39a5b7f239fb74eae06adbe3995d6bd2c4e230e2 Mon Sep 17 00:00:00 2001 From: luukvbaal Date: Fri, 2 May 2025 19:46:30 +0200 Subject: fix(extui): cmdline visibility, cmdheight cursor position (#33774) Problem: The cmdline popupmenu is hidden behind extui windows. 'showmode' message is drawn over the cmdline. Changing the 'cmdheight' to accommodate space for the text in the cmdline may change the current cursor position. Solution: Ensure kZIndexMessages < zindex < kZIndexCmdlinePopupMenu. Clear the 'showmode' message when the cmdline level is negative. Temporarily set 'splitkeep' = "screen" when changing the 'cmdheight'. --- runtime/lua/vim/_extui/shared.lua | 3 ++- 1 file changed, 2 insertions(+), 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 95fc753b76..6b7c4b1dde 100644 --- a/runtime/lua/vim/_extui/shared.lua +++ b/runtime/lua/vim/_extui/shared.lua @@ -29,7 +29,6 @@ local wincfg = { -- Default cfg for nvim_open_win(). width = 10000, height = 1, noautocmd = true, - zindex = 300, } --- Ensure the various buffers and windows have not been deleted. @@ -63,6 +62,8 @@ function M.tab_check_wins() 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', + -- 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, }) M.wins[M.tab][type] = api.nvim_open_win(M.bufs[type], false, cfg) -- cgit v1.3-3-g829e