diff options
author | Rishikesh Vaishnav <rishhvaishnav@gmail.com> | 2021-12-17 18:05:00 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-17 18:05:00 -0800 |
commit | 36c401db243da08a60bde7f2c42e1ed9f5204c85 (patch) | |
tree | 57f23153da682e2655f8422b2d6d86c55571eb96 /runtime/lua/vim/diagnostic.lua | |
parent | 6a92a53c02c429630c4b961e51dc97f3354ea196 (diff) | |
download | rneovim-36c401db243da08a60bde7f2c42e1ed9f5204c85.tar.gz rneovim-36c401db243da08a60bde7f2c42e1ed9f5204c85.tar.bz2 rneovim-36c401db243da08a60bde7f2c42e1ed9f5204c85.zip |
fix(lsp): correctly align start and end range to codepoints during incremental sync (#16670)
Closes #16624
Fixes two issues with aligning the start position and end position to
codepoints when calculating the start and end range.
When aligning the start position:
* use aligned byte index to calculate character index rather than
the unadjusted byte
When aligning the end position:
* do not adjust the end byte if it falls on a UTF-8 codepoint
* align byte to the first byte of the next codepoint rather than the
last byte of the current codepoint
* compute character character end range on the aligned byte index
This commit also adds additional test coverage, including multibyte operations
that previously failed before this commit.
Diffstat (limited to 'runtime/lua/vim/diagnostic.lua')
0 files changed, 0 insertions, 0 deletions