File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Plugins/Flow.Launcher.Plugin.Sys Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -70,13 +70,19 @@ public List<Result> Query(Query query)
70
70
return _themeSelector . Query ( query ) ;
71
71
}
72
72
73
- var commands = Commands ( ) ;
73
+ var commands = Commands ( query ) ;
74
74
var results = new List < Result > ( ) ;
75
+ var isEmptyQuery = string . IsNullOrEmpty ( query . Search ) || string . IsNullOrWhiteSpace ( query . Search ) ;
75
76
foreach ( var c in commands )
76
77
{
77
78
var command = _settings . Commands . First ( x => x . Key == c . Title ) ;
78
79
c . Title = command . Name ;
79
80
c . SubTitle = command . Description ;
81
+ if ( isEmptyQuery )
82
+ {
83
+ results . Add ( c ) ;
84
+ continue ;
85
+ }
80
86
81
87
// Match from localized title & localized subtitle & keyword
82
88
var titleMatch = _context . API . FuzzySearch ( query . Search , c . Title ) ;
@@ -188,7 +194,7 @@ private static unsafe bool EnableShutdownPrivilege()
188
194
}
189
195
}
190
196
191
- private List < Result > Commands ( )
197
+ private List < Result > Commands ( Query query )
192
198
{
193
199
var results = new List < Result > ( ) ;
194
200
var recycleBinFolder = "shell:RecycleBinFolder" ;
@@ -491,7 +497,7 @@ private List<Result> Commands()
491
497
Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\ue790 " ) ,
492
498
Action = c =>
493
499
{
494
- _context . API . ChangeQuery ( $ "{ ThemeSelector . Keyword } ") ;
500
+ _context . API . ChangeQuery ( $ "{ query . ActionKeyword } { ( string . IsNullOrEmpty ( query . ActionKeyword ) ? string . Empty : Plugin . Query . ActionKeywordSeparator ) } { ThemeSelector . Keyword } { Plugin . Query . ActionKeywordSeparator } ") ;
495
501
return false ;
496
502
}
497
503
}
You can’t perform that action at this time.
0 commit comments