diff options
author | luukvbaal <luukvbaal@gmail.com> | 2025-01-02 14:51:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-02 05:51:03 -0800 |
commit | 48e2a73610ca5639408f79b3d8eebd3e5f57a327 (patch) | |
tree | e84d5ab3decc765d7532c172d961fcd554d5b23a /test/functional/ui/cmdline_spec.lua | |
parent | 9d9ee3476e6478850ce8822c85154f0c98570371 (diff) | |
download | rneovim-48e2a73610ca5639408f79b3d8eebd3e5f57a327.tar.gz rneovim-48e2a73610ca5639408f79b3d8eebd3e5f57a327.tar.bz2 rneovim-48e2a73610ca5639408f79b3d8eebd3e5f57a327.zip |
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.
Diffstat (limited to 'test/functional/ui/cmdline_spec.lua')
-rw-r--r-- | test/functional/ui/cmdline_spec.lua | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua index 63764a9b6c..1f7d5525f3 100644 --- a/test/functional/ui/cmdline_spec.lua +++ b/test/functional/ui/cmdline_spec.lua @@ -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) |