mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 01:08:20 +00:00
vim-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 vim/vim#9992,
closes vim/vim#9986)
e7dd0fa2c6
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
@@ -3472,7 +3472,13 @@ void f_getcompletion(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
}
|
||||
|
||||
theend:
|
||||
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 = xstrdup(xpc.xp_pattern);
|
||||
} else {
|
||||
pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context);
|
||||
}
|
||||
|
||||
ExpandOne(&xpc, pat, NULL, options, WILD_ALL_KEEP);
|
||||
tv_list_alloc_ret(rettv, xpc.xp_numfiles);
|
||||
|
||||
|
Reference in New Issue
Block a user