From cb036cae5fb1ab0fb699436d2dbbc3295657967e Mon Sep 17 00:00:00 2001 From: luukvbaal Date: Fri, 6 Jun 2025 16:04:45 +0200 Subject: fix(extui): use visible to determine active "more" (#34327) Problem: Current window is checked to determine whether "more" window is open. Making it the current window is scheduled in case the cmdwin is open so this can be too late. "cmdline_hide" may be emitted when the topline is temporarily invalid (after incsearch->restore_viewstate()). Solution: Use the window visibility to determine an active "more" window instead. Don't nvim__redraw->flush the "cmdline_hide" event (a normal will already happen). --- runtime/lua/vim/_extui.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/lua/vim/_extui.lua') diff --git a/runtime/lua/vim/_extui.lua b/runtime/lua/vim/_extui.lua index 509618b266..fc598c8d5e 100644 --- a/runtime/lua/vim/_extui.lua +++ b/runtime/lua/vim/_extui.lua @@ -49,7 +49,7 @@ local function ui_callback(event, ...) ext.tab_check_wins() handler(...) api.nvim__redraw({ - flush = true, + flush = handler ~= ext.cmd.cmdline_hide or nil, cursor = handler == ext.cmd[event] and true or nil, win = handler == ext.cmd[event] and ext.wins.cmd or nil, }) -- cgit