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/messages.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'runtime/lua/vim/_extui/messages.lua') diff --git a/runtime/lua/vim/_extui/messages.lua b/runtime/lua/vim/_extui/messages.lua index ad8511ac6d..6b961d23af 100644 --- a/runtime/lua/vim/_extui/messages.lua +++ b/runtime/lua/vim/_extui/messages.lua @@ -331,7 +331,7 @@ function M.msg_clear() end --- ---@param content MsgContent function M.msg_showmode(content) - M.virt.last[M.virt.idx.mode] = content + M.virt.last[M.virt.idx.mode] = ext.cmd.level < 0 and content or {} M.virt.last[M.virt.idx.search] = {} set_virttext('last') end @@ -386,7 +386,6 @@ function M.set_pos(type) height = height, row = win == ext.wins[ext.tab].box and 0 or 1, col = 10000, - zindex = type == 'more' and 299 or nil, }) if type == 'box' then -- Ensure last line is visible and first line is at top of window. -- cgit