diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs index f9d8963e6a9..d7b0690828a 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs @@ -57,19 +57,16 @@ internal async Task> SearchAsync(Query query, CancellationToken tok { if (string.IsNullOrEmpty(query.Search) && ActionKeywordMatch(query, Settings.ActionKeyword.QuickAccessActionKeyword)) return QuickAccess.AccessLinkListAll(query, Settings.QuickAccessLinks); - - var quickAccessLinks = QuickAccess.AccessLinkListMatched(query, Settings.QuickAccessLinks); - - results.UnionWith(quickAccessLinks); } else { + // No action keyword matched- plugin should not handle this query, return empty results. return new List(); } IAsyncEnumerable searchResults; - bool isPathSearch = query.Search.IsLocationPathString() + bool isPathSearch = query.Search.IsLocationPathString() || EnvironmentVariables.IsEnvironmentVariableSearch(query.Search) || EnvironmentVariables.HasEnvironmentVar(query.Search); @@ -103,10 +100,18 @@ when ActionKeywordMatch(query, Settings.ActionKeyword.IndexSearchActionKeyword) searchResults = Settings.IndexProvider.SearchAsync(query.Search, token); engineName = Enum.GetName(Settings.IndexSearchEngine); break; + + case true or false + when ActionKeywordMatch(query, Settings.ActionKeyword.QuickAccessActionKeyword): + return QuickAccess.AccessLinkListMatched(query, Settings.QuickAccessLinks); + default: return results.ToList(); } + // Merge Quick Access Link results for non-path searches. + results.UnionWith(QuickAccess.AccessLinkListMatched(query, Settings.QuickAccessLinks)); + try { await foreach (var search in searchResults.WithCancellation(token).ConfigureAwait(false))