File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
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,11 +633,6 @@ private async void QueryResults()
631
633
return ;
632
634
}
633
635
634
- var query = ConstructQuery ( QueryText , Settings . CustomShortcuts , Settings . BuiltinShortcuts ) ;
635
-
636
- if ( query == null ) // shortcut expanded
637
- return ;
638
-
639
636
_updateSource ? . Dispose ( ) ;
640
637
641
638
var currentUpdateSource = new CancellationTokenSource ( ) ;
@@ -743,6 +740,11 @@ async Task QueryTask(PluginPair plugin)
743
740
744
741
private Query ConstructQuery ( string queryText , IEnumerable < CustomShortcutModel > customShortcuts , IEnumerable < BuiltinShortcutModel > builtInShortcuts )
745
742
{
743
+ if ( string . IsNullOrWhiteSpace ( queryText ) )
744
+ {
745
+ return null ;
746
+ }
747
+
746
748
StringBuilder queryBuilder = new ( queryText ) ;
747
749
StringBuilder queryBuilderTmp = new ( queryText ) ;
748
750
You can’t perform that action at this time.
0 commit comments