-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prioritize original user symbol in FAR results above cascaded symbols. #74805
Conversation
protected readonly List<Entry> EntriesWhenNotGroupingByDefinition = []; | ||
protected readonly List<Entry> EntriesWhenGroupingByDefinition = []; | ||
protected readonly (List<Entry> primary, List<Entry> nonPrimary) EntriesWhenNotGroupingByDefinition = ([], []); | ||
protected readonly (List<Entry> primary, List<Entry> nonPrimary) EntriesWhenGroupingByDefinition = ([], []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
general idea is that we have 'entries' sorted into two sections. The 'primary' entries (those associated with the original symbol teh user is finding) and non-primary (those that came about from cascading).
@@ -134,6 +134,9 @@ private StreamingFindUsagesPresenter( | |||
public IClassificationFormatMap ClassificationFormatMap | |||
=> _lazyClassificationFormatMap.Value; | |||
|
|||
private static bool IsPrimary(DefinitionItem definition) | |||
=> definition.Properties.ContainsKey(DefinitionItem.Primary); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already had this data in the definitionItem. We were using it for other featuers. but hadn't updated FAR properly.
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2201415
Ensure that the initial symbol a user performs 'find all references' on is prioritized at the top of the FAR window (above all cascaded symbols):