feat(extui): support paging in the dialog window (#35310)

Problem:  Unable to see e.g. `inputlist()` prompts that exceed the dialog
          window height.
          Multi-line prompts are not handled properly, and tracking
          is insufficient for messages in cmdline_block mode.
Solution: Add vim.on_key handler while the dialog window is open that
          forwards paging keys to the window.
          Properly render multi-line prompts. Keep track of both the start
          and end of the current cmdline prompt. Append messages after the
          current prompt in cmdline_block mode.
This commit is contained in:
luukvbaal
2025-08-21 14:56:59 +02:00
committed by GitHub
parent 30dae87de4
commit 9467731865
4 changed files with 221 additions and 36 deletions

View File

@@ -49,7 +49,7 @@ function M.check_targets()
hide = type ~= 'cmd' or M.cmdheight == 0 or nil,
border = type ~= 'msg' and 'none' or nil,
-- kZIndexMessages < zindex < kZIndexCmdlinePopupMenu (grid_defs.h), pager below others.
zindex = 200 - (type == 'pager' and 1 or 0),
zindex = 200 + (type == 'cmd' and 1 or type == 'pager' and -1 or 0),
_cmdline_offset = type == 'cmd' and 0 or nil,
})
if tab ~= curtab and api.nvim_win_is_valid(M.wins[type]) then