diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index 6c7ff1dc1..aac71b26e 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -112,12 +112,34 @@ namespace Flow.Launcher.Plugin.Program.Programs { title = resultName; matchResult = Main.Context.API.FuzzySearch(query, resultName); + + // When there's a localized name, also search the original English name + // This allows users to search using either the localized name or the English filename + if (useLocalizedName) + { + var englishNameMatch = Main.Context.API.FuzzySearch(query, Name); + if (englishNameMatch.Score > matchResult.Score) + { + matchResult = englishNameMatch; + } + } } else { // Search in both title = $"{resultName}: {Description}"; var nameMatch = Main.Context.API.FuzzySearch(query, resultName); + + // When there's a localized name, also search the original English name + if (useLocalizedName) + { + var englishNameMatch = Main.Context.API.FuzzySearch(query, Name); + if (englishNameMatch.Score > nameMatch.Score) + { + nameMatch = englishNameMatch; + } + } + var descriptionMatch = Main.Context.API.FuzzySearch(query, Description); if (descriptionMatch.Score > nameMatch.Score) { @@ -143,11 +165,6 @@ namespace Flow.Launcher.Plugin.Program.Programs candidates.Add(ExecutableName); } - if (useLocalizedName) - { - candidates.Add(Name); - } - matchResult = Match(query, candidates); if (matchResult == null) {