@@ -205,6 +205,15 @@ private void LoadHistory()
205
205
}
206
206
}
207
207
208
+ [ RelayCommand ]
209
+ private void ReQuery ( )
210
+ {
211
+ if ( SelectedIsFromQueryResults ( ) )
212
+ {
213
+ QueryResults ( isReQuery : true ) ;
214
+ }
215
+ }
216
+
208
217
[ RelayCommand ]
209
218
private void LoadContextMenu ( )
210
219
{
@@ -495,8 +504,8 @@ private void UpdatePreview()
495
504
/// but we don't want to move cursor to end when query is updated from TextBox
496
505
/// </summary>
497
506
/// <param name="queryText"></param>
498
- /// <param name="reQuery ">Force query even when Query Text doesn't change</param>
499
- public void ChangeQueryText ( string queryText , bool reQuery = false )
507
+ /// <param name="isReQuery ">Force query even when Query Text doesn't change</param>
508
+ public void ChangeQueryText ( string queryText , bool isReQuery = false )
500
509
{
501
510
Application . Current . Dispatcher . Invoke ( ( ) =>
502
511
{
@@ -510,9 +519,9 @@ public void ChangeQueryText(string queryText, bool reQuery = false)
510
519
QueryTextCursorMovedToEnd = false ;
511
520
512
521
}
513
- else if ( reQuery )
522
+ else if ( isReQuery )
514
523
{
515
- Query ( ) ;
524
+ Query ( isReQuery : true ) ;
516
525
}
517
526
QueryTextCursorMovedToEnd = true ;
518
527
} ) ;
@@ -612,11 +621,11 @@ public string PreviewHotkey
612
621
613
622
#region Query
614
623
615
- public void Query ( )
624
+ public void Query ( bool isReQuery = false )
616
625
{
617
626
if ( SelectedIsFromQueryResults ( ) )
618
627
{
619
- QueryResults ( ) ;
628
+ QueryResults ( isReQuery ) ;
620
629
}
621
630
else if ( ContextMenuSelected ( ) )
622
631
{
@@ -716,7 +725,7 @@ private void QueryHistory()
716
725
717
726
private readonly IReadOnlyList < Result > _emptyResult = new List < Result > ( ) ;
718
727
719
- private async void QueryResults ( )
728
+ private async void QueryResults ( bool isReQuery = false )
720
729
{
721
730
_updateSource ? . Cancel ( ) ;
722
731
@@ -747,6 +756,8 @@ private async void QueryResults()
747
756
if ( currentCancellationToken . IsCancellationRequested )
748
757
return ;
749
758
759
+ // Update the query's IsReQuery property to true if this is a re-query
760
+ query . IsReQuery = isReQuery ;
750
761
751
762
// handle the exclusiveness of plugin using action keyword
752
763
RemoveOldQueryResults ( query ) ;
0 commit comments