forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(language-service): de-duplicate rename and reference results
The initial implementation assumed that the consuming editors would de-duplicate rename locations. In fact, vscode treats overlapping rename locations as distinct and errors when trying to preview the renames. This commit updates the language service to de-duplicate exact file+span matches before returning rename and reference locations. While vscode _does_ de-duplicate reference results, it still makes sense to de-duplicate them on our side when possible to make tests more understandable. If a template has 3 instances of a variable, it makes sense to get get 3 reference results rather than 4+ with some duplicates.
- Loading branch information
Showing
2 changed files
with
40 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters