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()
183183 return Title + SubTitle + Score ;
184184 }
185185
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+
186211 /// <summary>
187212 /// Additional data associated with this result
188213 /// </summary>
Original file line number Diff line number Diff line change @@ -688,20 +688,7 @@ private void QueryContextMenu()
688688 List < Result > results ;
689689 if ( selected == lastContextMenuResult )
690690 {
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 ;
705692 }
706693 else
707694 {
@@ -715,7 +702,7 @@ private void QueryContextMenu()
715702
716703 if ( ! string . IsNullOrEmpty ( query ) )
717704 {
718- var filtered = results . Where
705+ var filtered = results . Select ( x => x . Clone ( ) ) . Where
719706 (
720707 r =>
721708 {
You can’t perform that action at this time.
0 commit comments