summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument/implementation.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/method/textDocument/implementation.lua')
-rw-r--r--server/src/method/textDocument/implementation.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/method/textDocument/implementation.lua b/server/src/method/textDocument/implementation.lua
index c9062180..8bd35a6c 100644
--- a/server/src/method/textDocument/implementation.lua
+++ b/server/src/method/textDocument/implementation.lua
@@ -17,7 +17,7 @@ return function (lsp, params)
return nil
end
-- lua是从1开始的,因此都要+1
- local position = lines:position(params.position.line + 1, params.position.character + 1)
+ local position = lines:positionAsChar(params.position.line + 1, params.position.character)
local source = core.findSource(vm, position)
if not source then
return nil