summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-22 20:33:50 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-22 20:33:50 +0200
commit4f73b8e9cc83f647b34002554a8bdf9abec0a82f (patch)
treeaae61e658dd6f1074eb7f9b6cceea94f4ca7d1b0 /src/evalfunc.c
parent44aaf5416e0121500dd52b7cab306d7618b4fe53 (diff)
patch 8.2.1726: fuzzy matching only works on stringsv8.2.1726
Problem: Fuzzy matching only works on strings. Solution: Support passing a dict. Add matchfuzzypos() to also get the match positions. (Yegappan Lakshmanan, closes #6947)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index f96a4c44d1..de723aaef7 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -753,7 +753,8 @@ static funcentry_T global_functions[] =
{"matcharg", 1, 1, FEARG_1, ret_list_string, f_matcharg},
{"matchdelete", 1, 2, FEARG_1, ret_number, f_matchdelete},
{"matchend", 2, 4, FEARG_1, ret_number, f_matchend},
- {"matchfuzzy", 2, 2, FEARG_1, ret_list_string, f_matchfuzzy},
+ {"matchfuzzy", 2, 3, FEARG_1, ret_list_string, f_matchfuzzy},
+ {"matchfuzzypos", 2, 3, FEARG_1, ret_list_any, f_matchfuzzypos},
{"matchlist", 2, 4, FEARG_1, ret_list_string, f_matchlist},
{"matchstr", 2, 4, FEARG_1, ret_string, f_matchstr},
{"matchstrpos", 2, 4, FEARG_1, ret_list_any, f_matchstrpos},