@@ -205,6 +205,15 @@ private void LoadHistory()
205205 }
206206 }
207207
208+ [ RelayCommand ]
209+ private void ReQuery ( )
210+ {
211+ if ( SelectedIsFromQueryResults ( ) )
212+ {
213+ QueryResults ( isReQuery : true ) ;
214+ }
215+ }
216+
208217 [ RelayCommand ]
209218 private void LoadContextMenu ( )
210219 {
@@ -495,8 +504,8 @@ private void UpdatePreview()
495504 /// but we don't want to move cursor to end when query is updated from TextBox
496505 /// </summary>
497506 /// <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 )
500509 {
501510 Application . Current . Dispatcher . Invoke ( ( ) =>
502511 {
@@ -510,9 +519,9 @@ public void ChangeQueryText(string queryText, bool reQuery = false)
510519 QueryTextCursorMovedToEnd = false ;
511520
512521 }
513- else if ( reQuery )
522+ else if ( isReQuery )
514523 {
515- Query ( ) ;
524+ Query ( isReQuery : true ) ;
516525 }
517526 QueryTextCursorMovedToEnd = true ;
518527 } ) ;
@@ -612,11 +621,11 @@ public string PreviewHotkey
612621
613622 #region Query
614623
615- public void Query ( )
624+ public void Query ( bool isReQuery = false )
616625 {
617626 if ( SelectedIsFromQueryResults ( ) )
618627 {
619- QueryResults ( ) ;
628+ QueryResults ( isReQuery ) ;
620629 }
621630 else if ( ContextMenuSelected ( ) )
622631 {
@@ -716,7 +725,7 @@ private void QueryHistory()
716725
717726 private readonly IReadOnlyList < Result > _emptyResult = new List < Result > ( ) ;
718727
719- private async void QueryResults ( )
728+ private async void QueryResults ( bool isReQuery = false )
720729 {
721730 _updateSource ? . Cancel ( ) ;
722731
@@ -747,6 +756,8 @@ private async void QueryResults()
747756 if ( currentCancellationToken . IsCancellationRequested )
748757 return ;
749758
759+ // Update the query's IsReQuery property to true if this is a re-query
760+ query . IsReQuery = isReQuery ;
750761
751762 // handle the exclusiveness of plugin using action keyword
752763 RemoveOldQueryResults ( query ) ;
0 commit comments