diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-01-14 19:29:55 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-01-14 20:09:56 +0800 |
commit | ef77598bfba1cd588f6b310d1806b725b8bec9cb (patch) | |
tree | 9edf76bb7dcdd45ff7c6b1a241c72135de92d9d0 /src/nvim/testdir | |
parent | bf0839044254482e02cc5e05b07e0b465a47e1e4 (diff) | |
download | rneovim-ef77598bfba1cd588f6b310d1806b725b8bec9cb.tar.gz rneovim-ef77598bfba1cd588f6b310d1806b725b8bec9cb.tar.bz2 rneovim-ef77598bfba1cd588f6b310d1806b725b8bec9cb.zip |
vim-patch:8.2.4346: a custom statusline may cause Esc to work like Enter
Problem: A custom statusline may cause Esc to work like Enter on the
command line when the popup menu is displayed.
Solution: Save and restore KeyTyped. (closes vim/vim#9749)
https://github.com/vim/vim/commit/481acb11413a436653e235d2098990b2ad47d195
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 2f4048cc33..68560d5d49 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -2304,6 +2304,14 @@ func Test_wildmenu_pum() return repeat(['aaaa'], 120) endfunc command -nargs=* -complete=customlist,CmdCompl Tcmd + + func MyStatusLine() abort + return 'status' + endfunc + func SetupStatusline() + set statusline=%!MyStatusLine() + set laststatus=2 + endfunc [CODE] call writefile(commands, 'Xtest') @@ -2487,6 +2495,13 @@ func Test_wildmenu_pum() call term_sendkeys(buf, ":ls\<CR>") call term_sendkeys(buf, ":com\<Tab> ") call VerifyScreenDump(buf, 'Test_wildmenu_pum_38', {}) + call term_sendkeys(buf, "\<C-U>\<CR>") + + " Esc still works to abort the command when 'statusline' is set + call term_sendkeys(buf, ":call SetupStatusline()\<CR>") + call term_sendkeys(buf, ":si\<Tab>") + call term_sendkeys(buf, "\<Esc>") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_39', {}) call term_sendkeys(buf, "\<C-U>\<CR>") call StopVimInTerminal(buf) |