0
0
mirror of https://github.com/vim/vim.git synced 2025-09-15 23:23:38 -04:00

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
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
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

View File

@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1168,
/**/
1167,
/**/