From 35b4aadfda017d50fc6a33cbb459d6f85e3a3d44 Mon Sep 17 00:00:00 2001 From: Vovodroid Date: Sun, 20 Apr 2025 11:09:31 +0300 Subject: [PATCH] Search whole option string. (#9391) Tune fuzzy match coefficients --- src/slic3r/GUI/fts_fuzzy_match.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/slic3r/GUI/fts_fuzzy_match.h b/src/slic3r/GUI/fts_fuzzy_match.h index c20960e372..7fa7304116 100644 --- a/src/slic3r/GUI/fts_fuzzy_match.h +++ b/src/slic3r/GUI/fts_fuzzy_match.h @@ -169,12 +169,12 @@ namespace fts { // Calculate score if (matched) { - static constexpr int sequential_bonus = 15; // bonus for adjacent matches - static constexpr int separator_bonus = 10/*30*/; // bonus if match occurs after a separator - // static constexpr int camel_bonus = 30; // bonus if match is uppercase and prev is lower - static constexpr int first_letter_bonus = 15; // bonus if the first letter is matched + static constexpr int sequential_bonus = 75; // bonus for adjacent matches + static constexpr int separator_bonus = 10; // bonus if match occurs after a separator + // static constexpr int camel_bonus = 30; // bonus if match is uppercase and prev is lower + static constexpr int first_letter_bonus = -30; // bonus if the first letter is matched - static constexpr int leading_letter_penalty = -1/*-5*/; // penalty applied for every letter in str before the first match + static constexpr int leading_letter_penalty = -1; // penalty applied for every letter in str before the first match static constexpr int max_leading_letter_penalty = -15; // maximum penalty for leading letters static constexpr int unmatched_letter_penalty = -1; // penalty for every letter that doesn't matter