Skip to content
Snippets Groups Projects
Unverified Commit 345bd91d authored by Sergey Slipchenko's avatar Sergey Slipchenko Committed by GitHub
Browse files

fix(lsp): handle absence of a trailing newline #25194

Fixes #24339

rust-analyzer sends "Invalid offset" error in such cases. Some other
servers handle it specially.

LSP spec mentions that "A range is comparable to a selection in an
editor". Most editors don't handle trailing newlines the same way
Neovim/Vim does, it's clearly visible if it's present or not. With that
in mind it's understandable why sending end position as simply the start
of the line after the last one is considered invalid in such cases.
parent 8bd6f7c2
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment