Mercurial > vim
diff src/cmdexpand.c @ 28166:130f4082a13d
patch 8.2.4608: getcompletion() does not work when 'wildoptions' has "fuzzy"
Commit: https://github.com/vim/vim/commit/e7dd0fa2c61fe71f12c72b0dcb7bb6415eb048fb
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Tue Mar 22 16:06:31 2022 +0000
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 22 Mar 2022 18:15:03 +0100 |
parents | 06535d568f74 |
children | 2b595cee4c85 |
line wrap: on
line diff
--- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -3707,7 +3707,12 @@ f_getcompletion(typval_T *argvars, typva # 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;