File tree Expand file tree Collapse file tree 2 files changed +27
-15
lines changed Expand file tree Collapse file tree 2 files changed +27
-15
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,31 @@ public override string ToString()
183
183
return Title + SubTitle + Score ;
184
184
}
185
185
186
+ /// <summary>
187
+ /// Clones the current result
188
+ /// </summary>
189
+ public Result Clone ( )
190
+ {
191
+ return new Result
192
+ {
193
+ Title = Title ,
194
+ SubTitle = SubTitle ,
195
+ ActionKeywordAssigned = ActionKeywordAssigned ,
196
+ CopyText = CopyText ,
197
+ AutoCompleteText = AutoCompleteText ,
198
+ IcoPath = IcoPath ,
199
+ RoundedIcon = RoundedIcon ,
200
+ Icon = Icon ,
201
+ Glyph = Glyph ,
202
+ Action = Action ,
203
+ AsyncAction = AsyncAction ,
204
+ Score = Score ,
205
+ TitleHighlightData = TitleHighlightData ,
206
+ OriginQuery = OriginQuery ,
207
+ PluginDirectory = PluginDirectory
208
+ } ;
209
+ }
210
+
186
211
/// <summary>
187
212
/// Additional data associated with this result
188
213
/// </summary>
Original file line number Diff line number Diff line change @@ -688,20 +688,7 @@ private void QueryContextMenu()
688
688
List < Result > results ;
689
689
if ( selected == lastContextMenuResult )
690
690
{
691
- // Use copy to keep the original results unchanged
692
- results = lastContextMenuResults . ConvertAll ( result => new Result
693
- {
694
- Title = result . Title ,
695
- SubTitle = result . SubTitle ,
696
- IcoPath = result . IcoPath ,
697
- PluginDirectory = result . PluginDirectory ,
698
- Action = result . Action ,
699
- ContextData = result . ContextData ,
700
- Glyph = result . Glyph ,
701
- OriginQuery = result . OriginQuery ,
702
- Score = result . Score ,
703
- AsyncAction = result . AsyncAction ,
704
- } ) ;
691
+ results = lastContextMenuResults ;
705
692
}
706
693
else
707
694
{
@@ -715,7 +702,7 @@ private void QueryContextMenu()
715
702
716
703
if ( ! string . IsNullOrEmpty ( query ) )
717
704
{
718
- var filtered = results . Where
705
+ var filtered = results . Select ( x => x . Clone ( ) ) . Where
719
706
(
720
707
r =>
721
708
{
You can’t perform that action at this time.
0 commit comments