diff --git a/src/modules/launcher/Wox.Infrastructure/StringMatcher.cs b/src/modules/launcher/Wox.Infrastructure/StringMatcher.cs index 442c1e9ddb..ef3e1045b2 100644 --- a/src/modules/launcher/Wox.Infrastructure/StringMatcher.cs +++ b/src/modules/launcher/Wox.Infrastructure/StringMatcher.cs @@ -212,8 +212,15 @@ namespace Wox.Infrastructure if (allSubstringsContainedInCompareString) { int count = query.Count(c => !char.IsWhiteSpace(c)); - int factor = count < 4 ? 10 : 5; - score += factor * count; + int threshold = 4; + if(count <= threshold) + { + score += count * 10; + } + else + { + score += threshold * 10 + (count - threshold) * 5; + } } return score;