mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
fix(lsp): create lsp requests with position offsets considering client encoding (#16382)
Co-authored-by: black-desk <clx814727823@gmail.com> Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
26eb605152
commit
22d7dd2aec
@@ -1493,11 +1493,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