1
0
forked from aniani/vim

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>
This commit is contained in:
Girish Palya
2025-03-03 20:01:06 +01:00
committed by Christian Brabandt
parent 360a39ae6c
commit d2219d547d
2 changed files with 3 additions and 1 deletions

View 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