@@ -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
@@ -1158,7 +1153,7 @@ private void QueryContextMenu()
11581153 {
11591154 results = PluginManager . GetContextMenusForPlugin ( selected ) ;
11601155 results . Add ( ContextMenuTopMost ( selected ) ) ;
1161- results . Add ( ContextMenuPluginInfo ( selected . PluginID ) ) ;
1156+ results . Add ( ContextMenuPluginInfo ( selected ) ) ;
11621157 }
11631158
11641159 if ( ! string . IsNullOrEmpty ( query ) )
@@ -1592,7 +1587,8 @@ private Result ContextMenuTopMost(Result result)
15921587 App . API . ReQuery ( ) ;
15931588 return false ;
15941589 } ,
1595- Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\uE74B " )
1590+ Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\uE74B " ) ,
1591+ OriginQuery = result . OriginQuery
15961592 } ;
15971593 }
15981594 else
@@ -1609,15 +1605,17 @@ private Result ContextMenuTopMost(Result result)
16091605 App . API . ReQuery ( ) ;
16101606 return false ;
16111607 } ,
1612- Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\uE74A " )
1608+ Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\uE74A " ) ,
1609+ OriginQuery = result . OriginQuery
16131610 } ;
16141611 }
16151612
16161613 return menu ;
16171614 }
16181615
1619- private static Result ContextMenuPluginInfo ( string id )
1616+ private static Result ContextMenuPluginInfo ( Result result )
16201617 {
1618+ var id = result . PluginID ;
16211619 var metadata = PluginManager . GetPluginForId ( id ) . Metadata ;
16221620 var translator = App . API ;
16231621
@@ -1639,7 +1637,8 @@ private static Result ContextMenuPluginInfo(string id)
16391637 {
16401638 App . API . OpenUrl ( metadata . Website ) ;
16411639 return true ;
1642- }
1640+ } ,
1641+ OriginQuery = result . OriginQuery
16431642 } ;
16441643 return menu ;
16451644 }
0 commit comments