add only path string match when lnk programs

This commit is contained in:
Jeremy Wu 2021-02-15 14:01:07 +11:00
parent 22bdbc9367
commit ad998b1788

View file

@ -43,7 +43,10 @@ namespace Flow.Launcher.Plugin.Program.Programs
var nameMatchResult = StringMatcher.FuzzySearch(query, Name);
var descriptionMatchResult = StringMatcher.FuzzySearch(query, Description);
var pathMatchResult = StringMatcher.FuzzySearch(query, Path.GetFileNameWithoutExtension(FullPath));
var pathMatchResult = new MatchResult(false, 0, new List<int>(), 0);
if ((LnkResolvedPath ?? FullPath) != FullPath)
pathMatchResult = StringMatcher.FuzzySearch(query, Path.GetFileNameWithoutExtension(FullPath));
var score = new[] { nameMatchResult.Score, descriptionMatchResult.Score, pathMatchResult.Score }.Max();