aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r--runtime/lua/vim/lsp.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua
index 17d6001496..880d811647 100644
--- a/runtime/lua/vim/lsp.lua
+++ b/runtime/lua/vim/lsp.lua
@@ -862,7 +862,7 @@ function lsp.omnifunc(findstart, base)
position = {
-- 0-indexed for both line and character
line = pos[1] - 1,
- character = pos[2],
+ character = vim.str_utfindex(line, pos[2]),
};
-- The completion context. This is only available if the client specifies
-- to send this using `ClientCapabilities.textDocument.completion.contextSupport === true`