aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblack_desk <clx814727823@gmail.com>2021-10-05 07:03:55 +0800
committerMichael Lingelbach <m.j.lbach@gmail.com>2021-10-31 14:15:56 -0700
commit2e3a4747e2001fbee0af6b4d6e2099fe68c61e45 (patch)
treed54a7e27f623fcd64dc3b65d36de058e3698f76c
parent0c1585bc634d67a8d9247c26924cbf8534d0462b (diff)
downloadrneovim-2e3a4747e2001fbee0af6b4d6e2099fe68c61e45.tar.gz
rneovim-2e3a4747e2001fbee0af6b4d6e2099fe68c61e45.tar.bz2
rneovim-2e3a4747e2001fbee0af6b4d6e2099fe68c61e45.zip
fix(lsp): default to UTF-16 in make_position_params
-rw-r--r--runtime/lua/vim/lsp/util.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 7a0ac458f3..319634a390 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -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