mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:57:45 +00:00
Assistant: Save match all match points in Fuzzy Match
From what I think, the array should consist of point indexes that have been matched instead of just the last one. For example, these are the array contents after searching 'file' for 'File Manager': - Before: [ 3 ] - Now: [ 0, 1, 2, 3 ] Besides that, this greatly improves the scoring logic, as it can now calculate bonuses. Closes: #8310
This commit is contained in:
parent
e7eccf3de2
commit
5e10cd364b
1 changed files with 1 additions and 1 deletions
|
@ -97,8 +97,8 @@ static FuzzyMatchResult fuzzy_match_recursive(String const& needle, String const
|
||||||
best_recursive_score = result.score;
|
best_recursive_score = result.score;
|
||||||
}
|
}
|
||||||
had_recursive_match = true;
|
had_recursive_match = true;
|
||||||
matches[next_match++] = haystack_idx;
|
|
||||||
}
|
}
|
||||||
|
matches[next_match++] = haystack_idx;
|
||||||
needle_idx++;
|
needle_idx++;
|
||||||
}
|
}
|
||||||
haystack_idx++;
|
haystack_idx++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue