diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-03-14 07:15:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-13 23:15:53 +0000 |
commit | 4f6196e91d23f17e6b25ea7356d5bbc5b87d95b6 (patch) | |
tree | 26b12468a65a9bc72566f7af7d37ab95fdbf7cad /test/old | |
parent | 282f73f067cb935612782d55efa99036505d363f (diff) | |
download | rneovim-4f6196e91d23f17e6b25ea7356d5bbc5b87d95b6.tar.gz rneovim-4f6196e91d23f17e6b25ea7356d5bbc5b87d95b6.tar.bz2 rneovim-4f6196e91d23f17e6b25ea7356d5bbc5b87d95b6.zip |
vim-patch:9.1.1200: cmdline pum not cleared for input() completion (#32879)
Problem: Cmdline pum not cleared for input() completion.
Solution: Temporary reset RedrawingDisabled in cmdline_pum_cleanup(),
like what is done in wildmenu_cleanup() (zeertzjq).
fixes: vim/vim#16874
closes: vim/vim#16876
https://github.com/vim/vim/commit/1830e787f6ee9828151284c44b494b801c677ee9
No code change is needed in Nvim, as RedrawingDisabled does not prevent
the compositor from removing a grid.
Diffstat (limited to 'test/old')
-rw-r--r-- | test/old/testdir/test_cmdline.vim | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/old/testdir/test_cmdline.vim b/test/old/testdir/test_cmdline.vim index 639a4c1d32..075bdae8d1 100644 --- a/test/old/testdir/test_cmdline.vim +++ b/test/old/testdir/test_cmdline.vim @@ -212,6 +212,37 @@ func Test_wildmenu_screendump() call StopVimInTerminal(buf) endfunc +func Test_wildmenu_with_input_func() + CheckScreendump + + let buf = RunVimInTerminal('-c "set wildmenu"', {'rows': 8}) + + call term_sendkeys(buf, ":call input('Command? ', '', 'command')\<CR>") + call VerifyScreenDump(buf, 'Test_wildmenu_input_func_1', {}) + call term_sendkeys(buf, "ech\<Tab>") + call VerifyScreenDump(buf, 'Test_wildmenu_input_func_2', {}) + call term_sendkeys(buf, "\<Space>") + call VerifyScreenDump(buf, 'Test_wildmenu_input_func_3', {}) + call term_sendkeys(buf, "bufn\<Tab>") + call VerifyScreenDump(buf, 'Test_wildmenu_input_func_4', {}) + call term_sendkeys(buf, "\<CR>") + + call term_sendkeys(buf, ":set wildoptions+=pum\<CR>") + + call term_sendkeys(buf, ":call input('Command? ', '', 'command')\<CR>") + call VerifyScreenDump(buf, 'Test_wildmenu_input_func_5', {}) + call term_sendkeys(buf, "ech\<Tab>") + call VerifyScreenDump(buf, 'Test_wildmenu_input_func_6', {}) + call term_sendkeys(buf, "\<Space>") + call VerifyScreenDump(buf, 'Test_wildmenu_input_func_7', {}) + call term_sendkeys(buf, "bufn\<Tab>") + call VerifyScreenDump(buf, 'Test_wildmenu_input_func_8', {}) + call term_sendkeys(buf, "\<CR>") + + " clean up + call StopVimInTerminal(buf) +endfunc + func Test_redraw_in_autocmd() CheckScreendump |