summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_extui/shared.lua
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2025-05-02 19:46:30 +0200
committerGitHub <noreply@github.com>2025-05-02 19:46:30 +0200
commit39a5b7f239fb74eae06adbe3995d6bd2c4e230e2 (patch)
treec0c18cda2e270d8142d02f63bd44cb278b84e07e /runtime/lua/vim/_extui/shared.lua
parentc916bdf3298608d26ec6f68dd7eb0f830e7b7909 (diff)
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'.
Diffstat (limited to 'runtime/lua/vim/_extui/shared.lua')
-rw-r--r--runtime/lua/vim/_extui/shared.lua3
1 files changed, 2 insertions, 1 deletions
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)