diff options
author | Sergey Slipchenko <faergeek@gmail.com> | 2023-09-21 14:06:40 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-21 03:06:40 -0700 |
commit | 345bd91db28ecfc4deb308f4971253b534f82d49 (patch) | |
tree | 53cfec9bb71d2fd45efe91b808141066d6e31d37 /runtime/lua/vim/_meta/json.lua | |
parent | 8bd6f7c20b403e8031a94f3a158a10c90b5c3efd (diff) | |
download | rneovim-345bd91db28ecfc4deb308f4971253b534f82d49.tar.gz rneovim-345bd91db28ecfc4deb308f4971253b534f82d49.tar.bz2 rneovim-345bd91db28ecfc4deb308f4971253b534f82d49.zip |
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.
Diffstat (limited to 'runtime/lua/vim/_meta/json.lua')
0 files changed, 0 insertions, 0 deletions