]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4328: command line complete matches cleard when typing character v8.2.4328
authorBram Moolenaar <Bram@vim.org>
Tue, 8 Feb 2022 17:40:36 +0000 (17:40 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 8 Feb 2022 17:40:36 +0000 (17:40 +0000)
Problem:    Command line complete matches cleard when typing character.
            (Dominique PellĂ©)
Solution:   Only remove a popup menu if there is one.

src/ex_getln.c
src/testdir/dumps/Test_wildmenu_pum_30.dump [new file with mode: 0644]
src/testdir/dumps/Test_wildmenu_pum_31.dump [new file with mode: 0644]
src/testdir/test_cmdline.vim
src/version.c

index 5def8a6a242706c68a211399f46191b31f412766..63f1c5dcbfbef698aa9bf4230271f4eca35e3b40 100644 (file)
@@ -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;
diff --git a/src/testdir/dumps/Test_wildmenu_pum_30.dump b/src/testdir/dumps/Test_wildmenu_pum_30.dump
new file mode 100644 (file)
index 0000000..76e4780
--- /dev/null
@@ -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
diff --git a/src/testdir/dumps/Test_wildmenu_pum_31.dump b/src/testdir/dumps/Test_wildmenu_pum_31.dump
new file mode 100644 (file)
index 0000000..157f16c
--- /dev/null
@@ -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
index 7faf811dbd384535ec834a2e970f1ff2e696f8c3..175647dd175fbdab37bc147322309bfe7b03b769 100644 (file)
@@ -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')
index 9d5fbc2e3976c7f9ed6c5640da87655948fd4665..7e61af9edd44d05a6002967a1172ad24f9543040 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4328,
 /**/
     4327,
 /**/