]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1168: wrong flags passed down to nextwild() v9.1.1168
authorGirish Palya <girishji@gmail.com>
Mon, 3 Mar 2025 19:01:06 +0000 (20:01 +0100)
committerChristian Brabandt <cb@256bit.org>
Mon, 3 Mar 2025 19:01:06 +0000 (20:01 +0100)
Problem:  wrong flags passed down to nextwild()
          (zeertzjq, after v9.1.1166)
Solution: only pass options flags (Girish Palya)

`options` needs to be passed into nextwild() since it may contain
WILD_KEEP_SOLE_ITEM which prevents the menu items list from getting
freed if there is only 1 item left (if `noselect` is set).

closes: #16778

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/ex_getln.c
src/version.c

index ff1b3eb7b22ab06449909a82d5070a30745678b8..fa1ea991b61c0e88b1520d1847d797a824c21391 100644 (file)
@@ -977,7 +977,7 @@ cmdline_wildchar_complete(
                    p_wmnu = 0;
 
                    // remove match
-                   nextwild(xp, WILD_PREV, 0 | (options & ~WIM_NOSELECT), escape);
+                   nextwild(xp, WILD_PREV, options, escape);
                    p_wmnu = p_wmnu_save;
                }
                (void)showmatches(xp, p_wmnu
index 29ea4beef689d17085f37babcd64a79d93dc673b..190528b9d8862226976498cccb37f8e9fc1e5323 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1168,
 /**/
     1167,
 /**/