@@ -444,12 +444,7 @@ private async Task OpenResultAsync(string index)
444444 if ( QueryResultsSelected ( ) )
445445 {
446446 _userSelectedRecord . Add ( result ) ;
447- // origin query is null when user select the context menu item directly of one item from query list
448- // so we don't want to add it to history
449- if ( result . OriginQuery != null )
450- {
451- _history . Add ( result . OriginQuery . RawQuery ) ;
452- }
447+ _history . Add ( result . OriginQuery . RawQuery ) ;
453448 lastHistoryIndex = 1 ;
454449 }
455450
@@ -1159,7 +1154,7 @@ private void QueryContextMenu()
11591154 {
11601155 results = PluginManager . GetContextMenusForPlugin ( selected ) ;
11611156 results . Add ( ContextMenuTopMost ( selected ) ) ;
1162- results . Add ( ContextMenuPluginInfo ( selected . PluginID ) ) ;
1157+ results . Add ( ContextMenuPluginInfo ( selected ) ) ;
11631158 }
11641159
11651160 if ( ! string . IsNullOrEmpty ( query ) )
@@ -1593,7 +1588,8 @@ private Result ContextMenuTopMost(Result result)
15931588 App . API . ReQuery ( ) ;
15941589 return false ;
15951590 } ,
1596- Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\uE74B " )
1591+ Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\uE74B " ) ,
1592+ OriginQuery = result . OriginQuery
15971593 } ;
15981594 }
15991595 else
@@ -1610,15 +1606,17 @@ private Result ContextMenuTopMost(Result result)
16101606 App . API . ReQuery ( ) ;
16111607 return false ;
16121608 } ,
1613- Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\uE74A " )
1609+ Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\uE74A " ) ,
1610+ OriginQuery = result . OriginQuery
16141611 } ;
16151612 }
16161613
16171614 return menu ;
16181615 }
16191616
1620- private static Result ContextMenuPluginInfo ( string id )
1617+ private static Result ContextMenuPluginInfo ( Result result )
16211618 {
1619+ var id = result . PluginID ;
16221620 var metadata = PluginManager . GetPluginForId ( id ) . Metadata ;
16231621 var translator = App . API ;
16241622
@@ -1640,7 +1638,8 @@ private static Result ContextMenuPluginInfo(string id)
16401638 {
16411639 App . API . OpenUrl ( metadata . Website ) ;
16421640 return true ;
1643- }
1641+ } ,
1642+ OriginQuery = result . OriginQuery
16441643 } ;
16451644 return menu ;
16461645 }
0 commit comments