Skip to content

If no explicit highlight range was given, highlight the node the diagnostic is anchored at instead of highlighting nothing #1441

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

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 24, 2023

Especially for IDEs we should always report a highlight range whenever possible because it looks nicer if a token can be underlined instead of just underlining the character at which the diagnostic is anchored, which is what many IDEs default to.

rdar://104113111

…nostic is anchored at instead of highlighting nothing

rdar://104113111
@ahoppen ahoppen requested a review from rintaro March 24, 2023 20:40
@ahoppen
Copy link
Member Author

ahoppen commented Mar 24, 2023

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 27, 2023

@swift-ci Please test

@ahoppen ahoppen merged commit 6e0e1fc into swiftlang:main Mar 27, 2023
ahoppen added a commit to ahoppen/swift-syntax that referenced this pull request Mar 31, 2023
If no explicit highlight range was given, highlight the node the diagnostic is anchored at instead of highlighting nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants