mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
fix up logic
This commit is contained in:
parent
eeb38d84b3
commit
e8a9377ec4
1 changed files with 6 additions and 4 deletions
|
|
@ -28,7 +28,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
TitleHighlightData = StringMatcher.FuzzySearch(query.Search, title).MatchData,
|
||||
Action = c =>
|
||||
{
|
||||
if (c.SpecialKeyState.CtrlPressed)
|
||||
if (c.SpecialKeyState.CtrlPressed || !(Settings.EnabledPathSearchKeyword || Settings.EnableSearchActionKeyword))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -41,11 +41,13 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
return false;
|
||||
}
|
||||
}
|
||||
// one of it is enabled
|
||||
var keyword = Settings.EnableSearchActionKeyword ? Settings.SearchActionKeyword : Settings.PathSearchActionKeyword;
|
||||
|
||||
keyword = keyword == "*" ? "" : $"{keyword} ";
|
||||
|
||||
string changeTo = path.EndsWith(Constants.DirectorySeperator) ? path : path + Constants.DirectorySeperator;
|
||||
Context.API.ChangeQuery(Settings.PathSearchActionKeyword == "*" ?
|
||||
changeTo :
|
||||
$"{Settings.PathSearchActionKeyword} {changeTo}");
|
||||
Context.API.ChangeQuery($"{keyword}{changeTo}");
|
||||
return false;
|
||||
},
|
||||
Score = score,
|
||||
|
|
|
|||
Loading…
Reference in a new issue