Commit: patch 9.1.1168: wrong flags passed down to nextwild()

4 views
Skip to first unread message

Christian Brabandt

unread,
Mar 3, 2025, 2:15:11 PM3/3/25
to vim...@googlegroups.com
patch 9.1.1168: wrong flags passed down to nextwild()

Commit: https://github.com/vim/vim/commit/d2219d547d2e70ba7af498866b0d12d3b6517b16
Author: Girish Palya <giri...@gmail.com>
Date: Mon Mar 3 20:01:06 2025 +0100

patch 9.1.1168: wrong flags passed down to nextwild()

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 <giri...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/ex_getln.c b/src/ex_getln.c
index ff1b3eb7b..fa1ea991b 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -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
diff --git a/src/version.c b/src/version.c
index 29ea4beef..190528b9d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1168,
/**/
1167,
/**/
Reply all
Reply to author
Forward
0 new messages