Skip to content
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

fix: Return correct target selection range for definition/declaration #759

Merged
merged 2 commits into from
Jan 11, 2022

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Jan 11, 2022

Fixes #735

Also fixes another bug where in textDocument/definition we previously checked Declaration.LinkSupport instead of Definition.LinkSupport client capability.

Lastly there was a (minor) bug in tests where we missed textDocument nesting, so link support was never tested.

@radeksimko radeksimko added the bug Something isn't working label Jan 11, 2022
@radeksimko radeksimko marked this pull request as ready for review January 11, 2022 09:42
@radeksimko radeksimko requested a review from a team January 11, 2022 09:42
@radeksimko radeksimko force-pushed the b-missing-target-def-range branch from 8e14cce to 850a15c Compare January 11, 2022 10:43
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Good job catching the other two bugs, too!

internal/lsp/location_links.go Show resolved Hide resolved
@radeksimko radeksimko force-pushed the b-missing-target-def-range branch from 850a15c to 7dccf7b Compare January 11, 2022 15:50
@radeksimko radeksimko merged commit 83e1347 into main Jan 11, 2022
@radeksimko radeksimko deleted the b-missing-target-def-range branch January 11, 2022 16:06
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

textDocument/definition returns targetSelectionRange with a start and end of (0,0).
2 participants