diff options
| author | Sean Dewar <6256228+seandewar@users.noreply.github.com> | 2026-02-04 12:15:34 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-04 13:15:34 +0100 |
| commit | 9655bd560f6cce646e77e6ba1f75e7c08462fdf3 (patch) | |
| tree | 78746d8c9d99de29bd2968faa991b8e2fd7fb408 /runtime/lua/vim/_extui/cmdline.lua | |
| parent | ddd1bf757fab3615301053acab5cc85508340844 (diff) | |
fix(ui2): don't adjust dialog pos for pum wildmenu (#37695)
Problem: Dialog position unnecessarily adjusted for pum wildmenu.
Solution: Apply no offset if the pum is visible.
Diffstat (limited to 'runtime/lua/vim/_extui/cmdline.lua')
| -rw-r--r-- | runtime/lua/vim/_extui/cmdline.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/_extui/cmdline.lua b/runtime/lua/vim/_extui/cmdline.lua index 2e0f7d60e8..de538b3a65 100644 --- a/runtime/lua/vim/_extui/cmdline.lua +++ b/runtime/lua/vim/_extui/cmdline.lua @@ -8,7 +8,7 @@ local M = { srow = 0, -- Buffer row at which the current cmdline starts; > 0 in block mode. erow = 0, -- Buffer row at which the current cmdline ends; messages appended here in block mode. level = -1, -- Current cmdline level; 0 when inactive, -1 one loop iteration after closing. - wmnumode = 0, -- Return value of wildmenumode(), dialog position adjusted when toggled. + wmnumode = 0, -- wildmenumode() when not using the pum, dialog position adjusted when toggled. } --- Set the 'cmdheight' and cmdline window height. Reposition message windows. @@ -29,7 +29,7 @@ local function win_config(win, hide, height) vim.o.cmdheight = height end) ext.msg.set_pos() - elseif M.wmnumode ~= (M.prompt and fn.wildmenumode() or 0) then + elseif M.wmnumode ~= (M.prompt and fn.pumvisible() == 0 and fn.wildmenumode() or 0) then M.wmnumode = (M.wmnumode == 1 and 0 or 1) ext.msg.set_pos() end |
