summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument/signatureHelp.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-21 15:41:59 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-21 15:41:59 +0800
commita67da00e8e2b61a2fa197188b7ffb3e3b83a2a74 (patch)
tree749c08fa9ad3e5131c24592c72db121e1bb9d601 /server/src/method/textDocument/signatureHelp.lua
parentb80dc1e6acaf9df1c2f53ca83f0ed9cbf8e1fa71 (diff)
downloadlua-language-server-a67da00e8e2b61a2fa197188b7ffb3e3b83a2a74.zip
更加准确的分词
Diffstat (limited to 'server/src/method/textDocument/signatureHelp.lua')
-rw-r--r--server/src/method/textDocument/signatureHelp.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/src/method/textDocument/signatureHelp.lua b/server/src/method/textDocument/signatureHelp.lua
index cf9935bd..98d2ea9b 100644
--- a/server/src/method/textDocument/signatureHelp.lua
+++ b/server/src/method/textDocument/signatureHelp.lua
@@ -6,8 +6,7 @@ return function (lsp, params)
if not vm then
return
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 hovers = core.signature(vm, position)
if not hovers then
return