]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1739: Matches may be listed twice with wildmode=longest,list v9.1.1739
authorzeertzjq <zeertzjq@outlook.com>
Sun, 7 Sep 2025 07:35:04 +0000 (09:35 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 7 Sep 2025 07:35:04 +0000 (09:35 +0200)
Problem:  Matches may be listed twice with wildmode=longest,list when
          "longest" doesn't change command line (after 9.1.1737).
Solution: Set did_wild_list when trying "list" after "longest"
          (zeertzjq).

closes: #18227

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/ex_getln.c
src/testdir/test_cmdline.vim
src/version.c

index 07c15ef2a86564f029fe93455aca86d08e72bf58..1c13db901824f97f71ec2d553faf3af2b895e56c 100644 (file)
@@ -1038,6 +1038,8 @@ cmdline_wildchar_complete(
                            nextwild(xp, WILD_NEXT, options, escape);
                        (void)showmatches(xp, p_wmnu, wim_list_next,
                                wim_noselect_next);
+                       if (wim_list_next)
+                           *did_wild_list = TRUE;
                    }
                }
            }
index 4e6b5351597bc247c7aa500dd57de0b216232089..abbd0d2c866e966eb7e70021741b35cf0958c00a 100644 (file)
@@ -2829,6 +2829,8 @@ func Test_wildmenu_pum()
   call term_sendkeys(buf, "\<C-U>set wildmode=longest,list\<CR>")
   call term_sendkeys(buf, ":cn\<Tab>")
   call VerifyScreenDump(buf, 'Test_wildmenu_pum_30', {})
+  call term_sendkeys(buf, "\<Tab>")
+  call VerifyScreenDump(buf, 'Test_wildmenu_pum_30', {})
   call term_sendkeys(buf, "s")
   call VerifyScreenDump(buf, 'Test_wildmenu_pum_31', {})
 
index 06b7a5ba752d3f5cfb86635bbc030dcc00f6e1c1..8e6494a5b1be937e46ec317d308dbe2aea36bb9f 100644 (file)
@@ -724,6 +724,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1739,
 /**/
     1738,
 /**/