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 <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/ex_getln.c b/src/ex_getln.c
index ff1b3eb..fa1ea99 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -977,7 +977,7 @@
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