aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/python.vim
diff options
context:
space:
mode:
authorVolodymyr Chernetskyi <volodymyr_chernetskyi@goodyear.com>2026-09-07 18:47:48 +0200
committerGitHub <noreply@github.com>2026-09-07 12:47:48 -0400
commit9f425311c38fada4dc25f758c31933fe7b0b4dfe (patch)
tree833e0d4cd1b25d5641f90d6d95930caec4baf636 /runtime/syntax/python.vim
parentce5e230af8d371ba78d04057d7d840bd4c31fd22 (diff)
downloadrneovim-9f425311c38fada4dc25f758c31933fe7b0b4dfe.tar.gz
rneovim-9f425311c38fada4dc25f758c31933fe7b0b4dfe.tar.bz2
rneovim-9f425311c38fada4dc25f758c31933fe7b0b4dfe.zip
fix(lsp): semantic tokens ignore 'fileformat' when sizing line endings #41733
Problem: The eol_offset used to decode multiline semantic tokens is computed as vim.bo.fileformat[bufnr] == 'dos' and 2 or 1 which indexes the option value rather than the buffer, so it is never "dos" and the offset is always 1. A token that crosses a line boundary in a 'fileformat' of "dos" is then decoded one code unit short per line ending, and the highlight extends past the end of the token. Solution: Read the option with the buffer-scoped form, vim.bo[bufnr].fileformat. The existing multiline test covers both formats now. Its token length of 82 counts the line endings it spans, so the same token reaches four characters less far once the buffer is "dos". AI-assisted
Diffstat (limited to 'runtime/syntax/python.vim')
0 files changed, 0 insertions, 0 deletions