@@ -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 . 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,15 @@ 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
+ if ( string . IsNullOrEmpty ( query . ActionKeyword ) )
501
+ {
502
+ _context . API . ChangeQuery ( $ "{ ThemeSelector . Keyword } { Plugin . Query . ActionKeywordSeparator } ") ;
503
+ }
504
+ else
505
+ {
506
+ _context . API . ChangeQuery ( $ "{ query . ActionKeyword } { Plugin . Query . ActionKeywordSeparator } { ThemeSelector . Keyword } { Plugin . Query . ActionKeywordSeparator } ") ;
507
+
508
+ }
495
509
return false ;
496
510
}
497
511
}
0 commit comments