diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-21 15:41:59 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-21 15:41:59 +0800 |
commit | a67da00e8e2b61a2fa197188b7ffb3e3b83a2a74 (patch) | |
tree | 749c08fa9ad3e5131c24592c72db121e1bb9d601 /server/src/method/textDocument/implementation.lua | |
parent | b80dc1e6acaf9df1c2f53ca83f0ed9cbf8e1fa71 (diff) | |
download | lua-language-server-a67da00e8e2b61a2fa197188b7ffb3e3b83a2a74.zip |
更加准确的分词
Diffstat (limited to 'server/src/method/textDocument/implementation.lua')
-rw-r--r-- | server/src/method/textDocument/implementation.lua | 2 |
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 |