File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -622,7 +622,9 @@ private async void QueryResults()
622
622
{
623
623
_updateSource ? . Cancel ( ) ;
624
624
625
- if ( string . IsNullOrWhiteSpace ( QueryText ) )
625
+ var query = ConstructQuery ( QueryText , Settings . CustomShortcuts , Settings . BuiltinShortcuts ) ;
626
+
627
+ if ( query == null ) // shortcut expanded
626
628
{
627
629
Results . Clear ( ) ;
628
630
Results . Visbility = Visibility . Collapsed ;
@@ -631,9 +633,6 @@ private async void QueryResults()
631
633
return ;
632
634
}
633
635
634
- var query = ConstructQuery ( QueryText , Settings . CustomShortcuts , Settings . BuiltinShortcuts ) ;
635
-
636
-
637
636
_updateSource ? . Dispose ( ) ;
638
637
639
638
var currentUpdateSource = new CancellationTokenSource ( ) ;
@@ -741,6 +740,11 @@ async Task QueryTask(PluginPair plugin)
741
740
742
741
private Query ConstructQuery ( string queryText , IEnumerable < CustomShortcutModel > customShortcuts , IEnumerable < BuiltinShortcutModel > builtInShortcuts )
743
742
{
743
+ if ( string . IsNullOrWhiteSpace ( queryText ) )
744
+ {
745
+ return null ;
746
+ }
747
+
744
748
StringBuilder queryBuilder = new ( queryText ) ;
745
749
StringBuilder queryBuilderTmp = new ( queryText ) ;
746
750
You can’t perform that action at this time.
0 commit comments