@@ -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
@@ -1158,7 +1153,7 @@ private void QueryContextMenu()
1158
1153
{
1159
1154
results = PluginManager . GetContextMenusForPlugin ( selected ) ;
1160
1155
results . Add ( ContextMenuTopMost ( selected ) ) ;
1161
- results . Add ( ContextMenuPluginInfo ( selected . PluginID ) ) ;
1156
+ results . Add ( ContextMenuPluginInfo ( selected ) ) ;
1162
1157
}
1163
1158
1164
1159
if ( ! string . IsNullOrEmpty ( query ) )
@@ -1592,7 +1587,8 @@ private Result ContextMenuTopMost(Result result)
1592
1587
App . API . ReQuery ( ) ;
1593
1588
return false ;
1594
1589
} ,
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
1596
1592
} ;
1597
1593
}
1598
1594
else
@@ -1609,15 +1605,17 @@ private Result ContextMenuTopMost(Result result)
1609
1605
App . API . ReQuery ( ) ;
1610
1606
return false ;
1611
1607
} ,
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
1613
1610
} ;
1614
1611
}
1615
1612
1616
1613
return menu ;
1617
1614
}
1618
1615
1619
- private static Result ContextMenuPluginInfo ( string id )
1616
+ private static Result ContextMenuPluginInfo ( Result result )
1620
1617
{
1618
+ var id = result . PluginID ;
1621
1619
var metadata = PluginManager . GetPluginForId ( id ) . Metadata ;
1622
1620
var translator = App . API ;
1623
1621
@@ -1639,7 +1637,8 @@ private static Result ContextMenuPluginInfo(string id)
1639
1637
{
1640
1638
App . API . OpenUrl ( metadata . Website ) ;
1641
1639
return true ;
1642
- }
1640
+ } ,
1641
+ OriginQuery = result . OriginQuery
1643
1642
} ;
1644
1643
return menu ;
1645
1644
}
0 commit comments