Correct check and add a basic test for fuzzy_match_substring_case_insensitive

This commit is contained in:
ridiculousfish
2018-10-21 12:02:38 -07:00
parent 5efa18da15
commit fcd4a44b98
2 changed files with 3 additions and 1 deletions

View File

@@ -1848,7 +1848,7 @@ string_fuzzy_match_t string_fuzzy_match_string(const wcstring &string,
assert(match_against.size() >= string.size());
result.match_distance_first = match_against.size() - string.size();
result.match_distance_second = location; // prefer earlier matches
} else if (limit_type >= fuzzy_match_substring &&
} else if (limit_type >= fuzzy_match_substring_case_insensitive &&
(location = ifind(match_against, string)) != wcstring::npos) {
// A case-insensitive version of the string is in the match against.
result.type = fuzzy_match_substring_case_insensitive;