commit 9efdd4fe98e74b7068bd716388b2437a27d0ce6a
parent 1e7406fa38eef8cb9812272196a97cf530218c4e
Author: luukvbaal <luukvbaal@gmail.com>
Date: Mon, 5 May 2025 20:28:02 +0200
fix(extui): drop "more" window that is no longer floating #33861
Problem: Moving the "more" (or any extui)-window to a split with
`wincmd L` does not invalidate it as a tracked window.
Solution: Drop an extui window that is no longer floating.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/runtime/lua/vim/_extui/shared.lua b/runtime/lua/vim/_extui/shared.lua
@@ -52,7 +52,10 @@ function M.tab_check_wins()
end
local setopt = false
- if not api.nvim_win_is_valid(M.wins[M.tab][type]) then
+ if
+ not api.nvim_win_is_valid(M.wins[M.tab][type])
+ or not api.nvim_win_get_config(M.wins[M.tab][type]).zindex -- no longer floating
+ then
local top = { vim.opt.fcs:get().horiz or o.ambw == 'single' and '─' or '-', 'WinSeparator' }
local border = (type == 'more' or type == 'prompt') and { '', top, '', '', '', '', '', '' }
local cfg = vim.tbl_deep_extend('force', wincfg, {