0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.4608: getcompletion() does not work when 'wildoptions' has "fuzzy"

Problem:    getcompletion() does not work properly when 'wildoptions
            contains "fuzzy".
Solution:   Do not use addstar(). (Yegappan Lakshmanan, closes #9992,
            closes #9986)
This commit is contained in:
Yegappan Lakshmanan
2022-03-22 16:06:31 +00:00
committed by Bram Moolenaar
parent 35dc17634d
commit e7dd0fa2c6
4 changed files with 28 additions and 1 deletions

View File

@@ -3707,7 +3707,12 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
# endif
}
pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context);
if (cmdline_fuzzy_completion_supported(&xpc))
// when fuzzy matching, don't modify the search string
pat = vim_strsave(xpc.xp_pattern);
else
pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context);
if ((rettv_list_alloc(rettv) != FAIL) && (pat != NULL))
{
int i;