patch 9.1.1214: matchfuzzy() can be improved for camel case matches
Problem: When searching for "Cur", CamelCase matches like "lCursor" score
higher than exact prefix matches like Cursor, which is
counter-intuitive (Maxim Kim).
Solution: Add a 'camelcase' option to matchfuzzy() that lets users disable
CamelCase bonuses when needed, making prefix matches rank higher.
(glepnir)
fixes: #16504
closes: #16797
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/quickfix.c b/src/quickfix.c
index 1008dd5..e498d5e 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -6246,7 +6246,8 @@
// Fuzzy string match
CLEAR_FIELD(matches);
- while (fuzzy_match(str + col, spat, FALSE, &score, matches, sz) > 0)
+ while (fuzzy_match(str + col, spat, FALSE, &score,
+ matches, sz, TRUE) > 0)
{
// Pass the buffer number so that it gets used even for a
// dummy buffer, unless duplicate_name is set, then the