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

Supports TextDocumentContentChangeEvent#getRangeLength with null value #1696

Merged

Conversation

jmatss
Copy link
Contributor

@jmatss jmatss commented Nov 3, 2024

Fixes #1674.

Removes the usage of the deprecated TextDocumentContentChangeEvent.rangeLength. The length of the range is now calculated from the TextDocumentContentChangeEvent.range instead, which should produce the same result.

This fixes a NullPointerException that happened when the LSP client didn't set the rangeLength (which is allowed according to the LSP specification).

@angelozerr angelozerr added the bug Something isn't working label Nov 4, 2024
@angelozerr angelozerr added this to the 0.29.0 milestone Nov 4, 2024
@angelozerr angelozerr changed the title Remove usage of deprecated RangeLength in TextDocument Supports TextDocumentContentChangeEvent#getRangeLength with null value Nov 4, 2024
@angelozerr angelozerr merged commit 830e00d into eclipse-lemminx:main Nov 4, 2024
5 of 6 checks passed
@angelozerr
Copy link
Contributor

Thanks @jmatss !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception because of missing "rangeLength" of didChange notification
2 participants