eclipse-lemminx / lemminx

XML Language Server
Eclipse Public License 2.0
272 stars 93 forks source link

Supports TextDocumentContentChangeEvent#getRangeLength with null value #1696

Closed jmatss closed 2 weeks ago

jmatss commented 2 weeks ago

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 commented 2 weeks ago

Thanks @jmatss !