fix(lsp): default to UTF-16 in make_position_params

This commit is contained in:
black_desk 2021-10-05 07:03:55 +08:00 committed by Michael Lingelbach
parent 0c1585bc63
commit 2e3a4747e2

View File

@ -1788,7 +1788,9 @@ local function make_position_param()
if not line then
return { line = 0; character = 0; }
end
col = str_utfindex(line, col)
-- TODO handle offset_encoding
local _
_, col = str_utfindex(line, col)
return { line = row; character = col; }
end