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).
This commit is contained in:
luukvbaal
2025-06-06 16:04:45 +02:00
committed by GitHub
parent e5c5b563ec
commit cb036cae5f
3 changed files with 21 additions and 14 deletions

View File

@@ -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,
})