feat(ui)!: emit prompt "messages" as cmdline events #31525

Problem:  Prompts are emitted as messages events, where cmdline events
          are more appropriate. The user input is also emitted as
          message events in fast context, so cannot be displayed with
          vim.ui_attach().
Solution: Prompt for user input through cmdline prompts.
This commit is contained in:
luukvbaal
2025-01-02 14:51:03 +01:00
committed by GitHub
parent 9d9ee3476e
commit 48e2a73610
25 changed files with 259 additions and 351 deletions

View File

@@ -1485,31 +1485,28 @@ describe('cmdheight=0', function()
it('when substitute text', function()
command('set cmdheight=0 noruler laststatus=3')
feed('ifoo<ESC>')
screen:expect {
grid = [[
screen:try_resize(screen._width, 6)
screen:expect([[
fo^o |
{1:~ }|*3
{1:~ }|*4
{3:[No Name] [+] }|
]],
}
]])
feed(':%s/foo/bar/gc<CR>')
screen:expect {
grid = [[
screen:expect([[
{2:foo} |
{1:~ }|*3
{6:replace wi...q/l/^E/^Y)?}^ |
]],
}
{3: }|
|*2
{6:replace with bar (y/n/a/q}|
{6:/l/^E/^Y)?}^ |
]])
feed('y')
screen:expect {
grid = [[
screen:expect([[
^bar |
{1:~ }|*3
{1:~ }|*4
{3:[No Name] [+] }|
]],
}
]])
assert_alive()
end)