From dde658a514eb504c0d0aa5ec99ba6e26295869de Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Tue, 7 Jan 2020 07:22:00 +1100 Subject: [PATCH] rename variable state allWordsFullyMatched --- Wox.Infrastructure/StringMatcher.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Wox.Infrastructure/StringMatcher.cs b/Wox.Infrastructure/StringMatcher.cs index d8c6ae215..45fbe5808 100644 --- a/Wox.Infrastructure/StringMatcher.cs +++ b/Wox.Infrastructure/StringMatcher.cs @@ -71,7 +71,7 @@ namespace Wox.Infrastructure var lastMatchIndex = 0; bool allQuerySubstringsMatched = false; bool matchFoundInPreviousLoop = false; - bool allWordsFullyMatched = true; + bool allSubstringsContainedInCompareString = true; var indexList = new List(); @@ -131,7 +131,7 @@ namespace Wox.Infrastructure currentQuerySubstringCharacterIndex = 0; // if any of the substrings was not matched then consider as all are not matched - allWordsFullyMatched = !matchFoundInPreviousLoop ? false : allWordsFullyMatched; + allSubstringsContainedInCompareString = !matchFoundInPreviousLoop ? false : allSubstringsContainedInCompareString; } } @@ -140,7 +140,7 @@ namespace Wox.Infrastructure { // check if all query substrings were contained in the string to compare bool containedFully = lastMatchIndex - firstMatchIndex == queryWithoutCase.Length; - var score = CalculateSearchScore(query, stringToCompare, firstMatchIndex, lastMatchIndex - firstMatchIndex, containedFully, allWordsFullyMatched); + var score = CalculateSearchScore(query, stringToCompare, firstMatchIndex, lastMatchIndex - firstMatchIndex, containedFully, allSubstringsContainedInCompareString); var pinyinScore = ScoreForPinyin(stringToCompare, query); var result = new MatchResult