mirror of
https://github.com/neovim/neovim.git
synced 2026-02-01 01:24:30 +00:00
fix(lsp): handle offset encoding (#16783)
Co-authored-by: black-desk <clx814727823@gmail.com>
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
(cherry picked from commit 4687d853a5)
Co-authored-by: Rishikesh Vaishnav <rishhvaishnav@gmail.com>
This commit is contained in:
committed by
GitHub
parent
14357c83c5
commit
7b60ec79ea
@@ -1542,11 +1542,7 @@ local function adjust_start_col(lnum, line, items, encoding)
|
||||
end
|
||||
end
|
||||
if min_start_char then
|
||||
if encoding == 'utf-8' then
|
||||
return min_start_char
|
||||
else
|
||||
return vim.str_byteindex(line, min_start_char, encoding == 'utf-16')
|
||||
end
|
||||
return util._str_byteindex_enc(line, min_start_char, encoding)
|
||||
else
|
||||
return nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user