Skip to content

Commit

Permalink
Fix fuzzy matcher adding invalid matches (#909) (#1420)
Browse files Browse the repository at this point in the history
  • Loading branch information
dansalvato authored Dec 10, 2023
1 parent 0b751f6 commit 82ba05c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/cmp/matcher.lua
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ matcher.fuzzy = function(input, word, matches, option)
word_offset = word_offset + 1
end

if input_index > #input then
if matched and input_index > #input then
table.insert(matches, {
input_match_start = input_match_start,
input_match_end = input_match_end,
Expand Down

0 comments on commit 82ba05c

Please sign in to comment.