diff options
Diffstat (limited to 'src/cmdexpand.c')
-rw-r--r-- | src/cmdexpand.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 5ba6b084d3..defc282dbb 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -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; |