diff --git a/Plugins/Wox.Plugin.BrowserBookmark/Main.cs b/Plugins/Wox.Plugin.BrowserBookmark/Main.cs index 041ba2ae4b..e18eb49530 100644 --- a/Plugins/Wox.Plugin.BrowserBookmark/Main.cs +++ b/Plugins/Wox.Plugin.BrowserBookmark/Main.cs @@ -62,9 +62,9 @@ namespace Wox.Plugin.BrowserBookmark private bool MatchProgram(Bookmark bookmark, string queryString) { - if ((bookmark.Score = StringMatcher.FuzzySearch(queryString, bookmark.Name, new MatchOption()).Score) > 0) return true; - if ((bookmark.Score = StringMatcher.FuzzySearch(queryString, bookmark.PinyinName, new MatchOption).Score) > 0) return true; - if ((bookmark.Score = StringMatcher.FuzzySearch(queryString, bookmark.Url, new MatchOption()).Score / 10) > 0) return true; + if (StringMatcher.FuzzySearch(queryString, bookmark.Name, new MatchOption()).IsSearchPrecisionScoreMet()) return true; + if ( StringMatcher.FuzzySearch(queryString, bookmark.PinyinName, new MatchOption()).IsSearchPrecisionScoreMet()) return true; + if (StringMatcher.FuzzySearch(queryString, bookmark.Url, new MatchOption()).IsSearchPrecisionScoreMet()) return true; return false; } diff --git a/Wox.Infrastructure/StringMatcher.cs b/Wox.Infrastructure/StringMatcher.cs index c619bc9a84..7380278e7d 100644 --- a/Wox.Infrastructure/StringMatcher.cs +++ b/Wox.Infrastructure/StringMatcher.cs @@ -107,7 +107,7 @@ namespace Wox.Infrastructure return score; } - public static bool IsPreciciseMatch(this MatchResult matchResult) + public static bool IsSearchPrecisionScoreMet(this MatchResult matchResult) { var precisionScore = (SearchPrecisionScore)Enum.Parse(typeof(SearchPrecisionScore), UserSettingSearchPrecision ?? SearchPrecisionScore.Regular.ToString());