Skip to content

Commit ed5debf

Browse files
committed
fix: path search trigger in general search
1 parent 592f60a commit ed5debf

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,25 @@ internal async Task<List<Result>> SearchAsync(Query query, CancellationToken tok
5353
|| EnvironmentVariables.IsEnvironmentVariableSearch(query.Search)
5454
|| EnvironmentVariables.HasEnvironmentVar(query.Search);
5555

56-
// If action keyword is enabled and matched, get the active action keyword.
57-
var activeActionKeyword = Settings.GetActiveActionKeyword(keyword);
56+
ActionKeyword? activeActionKeyword;
57+
58+
if (!isPathSearch)
59+
{
60+
//If action keyword is enabled and matched, get the active action keyword.
61+
activeActionKeyword = Settings.GetActiveActionKeyword(keyword);
62+
}
63+
else
64+
{
65+
// If no action keyword matched but the query is a path search, set active action keyword to path search.
66+
activeActionKeyword = ActionKeyword.PathSearchActionKeyword;
67+
}
5868

5969
// No action keyword matched - plugin should not handle this query, return empty results.
60-
if (activeActionKeyword == null && !isPathSearch)
70+
if (activeActionKeyword == null)
6171
{
6272
return [];
6373
}
6474

65-
// If no action keyword matched but the query is a path search, set active action keyword to path search.
66-
if (activeActionKeyword == null && isPathSearch) activeActionKeyword = ActionKeyword.PathSearchActionKeyword;
67-
6875
// This allows the user to type the below action keywords and see/search the list of quick folder links
6976
if (string.IsNullOrEmpty(query.Search)
7077
&& activeActionKeyword.Equals(ActionKeyword.QuickAccessActionKeyword))

0 commit comments

Comments
 (0)