diff --git a/src/insexpand.c b/src/insexpand.c index f43c12665f..552c679579 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -1255,8 +1255,8 @@ ins_compl_build_pum(void) do { - // when completeopt include fuzzy option and leader is not null or empty - // set the cp_score for after compare. + // When 'completeopt' contains "fuzzy" and leader is not NULL or empty, + // set the cp_score for later comparisons. if (compl_fuzzy_match && compl_leader != NULL && lead_len > 0) compl->cp_score = fuzzy_match_str(compl->cp_str, compl_leader); @@ -4082,7 +4082,7 @@ ins_compl_show_filename(void) } /* - * find a completion item in when completeopt include fuzzy option + * Find a completion item when 'completeopt' contains "fuzzy". */ static compl_T * find_comp_when_fuzzy(void) diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index 1cd7d347c0..947b0bb646 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -2468,6 +2468,7 @@ func Test_complete_fuzzy_match() endif return [#{word: "foo"}, #{word: "foobar"}, #{word: "fooBaz"}, #{word: "foobala"}] endfunc + new set omnifunc=Omni_test set completeopt+=noinsert,fuzzy @@ -2480,13 +2481,13 @@ func Test_complete_fuzzy_match() " select next call feedkeys("S\\fb\", 'tx') call assert_equal('foobar', g:word) - " can circly select next + " can cyclically select next call feedkeys("S\\fb\\\", 'tx') call assert_equal(v:null, g:word) " select prev call feedkeys("S\\fb\", 'tx') call assert_equal(v:null, g:word) - " can circly select prev + " can cyclically select prev call feedkeys("S\\fb\\\\", 'tx') call assert_equal('fooBaz', g:word) @@ -2505,6 +2506,8 @@ func Test_complete_fuzzy_match() augroup! AAAAA_Group delfunc OnPumChange delfunc Omni_test + unlet g:item + unlet g:word endfunc " vim: shiftwidth=2 sts=2 expandtab nofoldenable diff --git a/src/version.c b/src/version.c index a3fef03732..92498e1dae 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 467, /**/ 466, /**/