Fix fuzzy matcher adding invalid matches (#909) (#1420)

This commit is contained in:
Dan Salvato 2023-12-10 03:57:59 -07:00 committed by GitHub
parent 0b751f6bee
commit 82ba05c784
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,