Skip to content

Commit e8a9377

Browse files
committed
fix up logic
1 parent eeb38d8 commit e8a9377

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ internal static Result CreateFolderResult(string title, string subtitle, string
2828
TitleHighlightData = StringMatcher.FuzzySearch(query.Search, title).MatchData,
2929
Action = c =>
3030
{
31-
if (c.SpecialKeyState.CtrlPressed)
31+
if (c.SpecialKeyState.CtrlPressed || !(Settings.EnabledPathSearchKeyword || Settings.EnableSearchActionKeyword))
3232
{
3333
try
3434
{
@@ -41,11 +41,13 @@ internal static Result CreateFolderResult(string title, string subtitle, string
4141
return false;
4242
}
4343
}
44+
// one of it is enabled
45+
var keyword = Settings.EnableSearchActionKeyword ? Settings.SearchActionKeyword : Settings.PathSearchActionKeyword;
46+
47+
keyword = keyword == "*" ? "" : $"{keyword} ";
4448

4549
string changeTo = path.EndsWith(Constants.DirectorySeperator) ? path : path + Constants.DirectorySeperator;
46-
Context.API.ChangeQuery(Settings.PathSearchActionKeyword == "*" ?
47-
changeTo :
48-
$"{Settings.PathSearchActionKeyword} {changeTo}");
50+
Context.API.ChangeQuery($"{keyword}{changeTo}");
4951
return false;
5052
},
5153
Score = score,

0 commit comments

Comments
 (0)