summaryrefslogtreecommitdiff
path: root/src/ranked_match.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2025-04-02 17:35:23 +1100
committerMaxime Coste <mawww@kakoune.org>2025-04-02 17:35:23 +1100
commit63efcc06d5bee7f05a1ee9539b2391c80e5d6205 (patch)
tree8ad15a23836f02421ff98796b7a2c994fe00165d /src/ranked_match.hh
parentc7d688f578c7b58989fc04e7bb1e9b5a939a5730 (diff)
Tweak ranked match behaviour to consider the number of full words
Tracking the number of query words that appear as full words in the candidate seems to fix a few cases where the existing fuzzy matching algorithm was not great. I have been running with this for a while and did not notice any annoyances, the whole RankedMatch code probably deserves more attention but this seems to go in the right direction.
Diffstat (limited to 'src/ranked_match.hh')
-rw-r--r--src/ranked_match.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ranked_match.hh b/src/ranked_match.hh
index 5a58defb..1d877d53 100644
--- a/src/ranked_match.hh
+++ b/src/ranked_match.hh
@@ -54,6 +54,7 @@ private:
StringView m_candidate{};
bool m_matches = false;
Flags m_flags = Flags::None;
+ int m_full_word_match_count = 0;
int m_word_boundary_match_count = 0;
int m_max_index = 0;
size_t m_input_sequence_number = 0;