@@ -444,12 +444,7 @@ private async Task OpenResultAsync(string index)
444
444
if ( QueryResultsSelected ( ) )
445
445
{
446
446
_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 ) ;
453
448
lastHistoryIndex = 1 ;
454
449
}
455
450
@@ -1159,7 +1154,7 @@ private void QueryContextMenu()
1159
1154
{
1160
1155
results = PluginManager . GetContextMenusForPlugin ( selected ) ;
1161
1156
results . Add ( ContextMenuTopMost ( selected ) ) ;
1162
- results . Add ( ContextMenuPluginInfo ( selected . PluginID ) ) ;
1157
+ results . Add ( ContextMenuPluginInfo ( selected ) ) ;
1163
1158
}
1164
1159
1165
1160
if ( ! string . IsNullOrEmpty ( query ) )
@@ -1593,7 +1588,8 @@ private Result ContextMenuTopMost(Result result)
1593
1588
App . API . ReQuery ( ) ;
1594
1589
return false ;
1595
1590
} ,
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
1597
1593
} ;
1598
1594
}
1599
1595
else
@@ -1610,15 +1606,17 @@ private Result ContextMenuTopMost(Result result)
1610
1606
App . API . ReQuery ( ) ;
1611
1607
return false ;
1612
1608
} ,
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
1614
1611
} ;
1615
1612
}
1616
1613
1617
1614
return menu ;
1618
1615
}
1619
1616
1620
- private static Result ContextMenuPluginInfo ( string id )
1617
+ private static Result ContextMenuPluginInfo ( Result result )
1621
1618
{
1619
+ var id = result . PluginID ;
1622
1620
var metadata = PluginManager . GetPluginForId ( id ) . Metadata ;
1623
1621
var translator = App . API ;
1624
1622
@@ -1640,7 +1638,8 @@ private static Result ContextMenuPluginInfo(string id)
1640
1638
{
1641
1639
App . API . OpenUrl ( metadata . Website ) ;
1642
1640
return true ;
1643
- }
1641
+ } ,
1642
+ OriginQuery = result . OriginQuery
1644
1643
} ;
1645
1644
return menu ;
1646
1645
}
0 commit comments