update allSubstringsContainedInCompareString calculation as per comment

This commit is contained in:
Jeremy Wu
2020-01-14 07:36:53 +11:00
parent 71d8c2080c
commit 592f1cafdb
2 changed files with 8 additions and 4 deletions

View File

@@ -210,7 +210,11 @@ namespace Wox.Infrastructure
}
if (allSubstringsContainedInCompareString)
score += 10 * string.Concat(query.Where(c => !char.IsWhiteSpace(c))).Count();
{
int count = query.Count(c => !char.IsWhiteSpace(c));
int factor = count < 4 ? 10 : 5;
score += factor * count;
}
return score;
}