Mercurial > vim
changeset 27603:98139cef237a v8.2.4328
patch 8.2.4328: command line complete matches cleard when typing character
Commit: https://github.com/vim/vim/commit/73a16c22a4703cb9a7becdf459ce62bd894980d7
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 8 17:40:36 2022 +0000
patch 8.2.4328: command line complete matches cleard when typing character
Problem: Command line complete matches cleard when typing character.
(Dominique Pell?)
Solution: Only remove a popup menu if there is one.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 08 Feb 2022 18:45:03 +0100 |
parents | 494128f79c93 |
children | 4f782c34c224 |
files | src/ex_getln.c src/testdir/dumps/Test_wildmenu_pum_30.dump src/testdir/dumps/Test_wildmenu_pum_31.dump src/testdir/test_cmdline.vim src/version.c |
diffstat | 5 files changed, 33 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -1883,7 +1883,8 @@ getcmdline_int( && c != Ctrl_L) { #ifdef FEAT_WILDMENU - cmdline_pum_remove(); + if (cmdline_pum_active()) + cmdline_pum_remove(); #endif (void)ExpandOne(&xpc, NULL, NULL, 0, WILD_FREE); did_wild_list = FALSE;
new file mode 100644 --- /dev/null +++ b/src/testdir/dumps/Test_wildmenu_pum_30.dump @@ -0,0 +1,10 @@ +|~+0#4040ff13#ffffff0| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|:+0#0000000&|c|n| @71 +|c|n|e|w|e|r| @6|c|n|f|i|l|e| @6|c|n|o|r|e|m|a|p| @40 +|c|n|e|x|t| @7|c|n|o|r|e|a|b@1|r|e|v| @1|c|n|o|r|e|m|e|n|u| @39 +|:|c|n> @71
new file mode 100644 --- /dev/null +++ b/src/testdir/dumps/Test_wildmenu_pum_31.dump @@ -0,0 +1,10 @@ +|~+0#4040ff13#ffffff0| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|:+0#0000000&|c|n| @71 +|c|n|e|w|e|r| @6|c|n|f|i|l|e| @6|c|n|o|r|e|m|a|p| @40 +|c|n|e|x|t| @7|c|n|o|r|e|a|b@1|r|e|v| @1|c|n|o|r|e|m|e|n|u| @39 +|:|c|n|s> @70
--- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -2132,6 +2132,15 @@ func Test_wildmenu_pum() call TermWait(buf) call VerifyScreenDump(buf, 'Test_wildmenu_pum_29', {}) + " Check "list" still works + call term_sendkeys(buf, "\<C-U>set wildmode=longest,list\<CR>") + call term_sendkeys(buf, ":cn\<Tab>") + call TermWait(buf) + call VerifyScreenDump(buf, 'Test_wildmenu_pum_30', {}) + call term_sendkeys(buf, "s") + call TermWait(buf) + call VerifyScreenDump(buf, 'Test_wildmenu_pum_31', {}) + call term_sendkeys(buf, "\<C-U>\<CR>") call StopVimInTerminal(buf) call delete('Xtest')