diff options
author | Michael Lingelbach <m.j.lbach@gmail.com> | 2022-01-13 02:34:04 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-13 02:34:04 -0800 |
commit | bc722c8a74766e14aff3a8e2fc46db72ed864053 (patch) | |
tree | cecc2c9445d080161ac03be09a39657f8b1b13e7 /runtime/lua/vim/lsp/buf.lua | |
parent | e7cd81156755c2f588752d469bceee9e48377b4e (diff) | |
download | rneovim-bc722c8a74766e14aff3a8e2fc46db72ed864053.tar.gz rneovim-bc722c8a74766e14aff3a8e2fc46db72ed864053.tar.bz2 rneovim-bc722c8a74766e14aff3a8e2fc46db72ed864053.zip |
fix(lsp): strictly enforce passing offset encoding (#17049)
This removes the "fallback" to utf-16 in many of our helper functions. We
should always explicitly pass these around when possible except in two
locations:
* generating params with help utilities called by buf.lua functions
* the buf.lua functions themselves
Anything that is called by the handler should be passed the offset encoding.
Diffstat (limited to 'runtime/lua/vim/lsp/buf.lua')
-rw-r--r-- | runtime/lua/vim/lsp/buf.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua index c1d777ae6c..e8633f5924 100644 --- a/runtime/lua/vim/lsp/buf.lua +++ b/runtime/lua/vim/lsp/buf.lua @@ -503,7 +503,7 @@ local function on_code_action_results(results, ctx) ---@private local function apply_action(action, client) if action.edit then - util.apply_workspace_edit(action.edit) + util.apply_workspace_edit(action.edit, client.offset_encoding) end if action.command then local command = type(action.command) == 'table' and action.command or action |