mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
![github-actions[bot]](/assets/img/avatar_default.png)
Previously, the `_str_utfindex_enc` and `_str_byteindex_enc` helper functions would return `nil` when `offset_encoding == "utf-8"` and `index == nil`. Clearly, this doesn't reflect the expected behavior of the functions they're wrapping which would return the length of the line in this case. This should fix behavior with servers that use UTF-8 `offset_encoding` when applying text edits, formatting a range, and doing range code actions (though this isn't tested currently).
(cherry picked from commit 5f4c501cf1
)
Co-authored-by: Rishikesh Vaishnav <rishhvaishnav@gmail.com>