Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(lsp): default to UTF-16 in make_position_params
  • Loading branch information
black-desk authored and mjlbach committed Oct 31, 2021
1 parent 0c1585b commit 2e3a474
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion runtime/lua/vim/lsp/util.lua
Expand Up @@ -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
Expand Down

0 comments on commit 2e3a474

Please sign in to comment.