summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-11-30 15:14:36 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-11-30 15:14:36 +0800
commit24243540681b97956ef29a6bec9d94a6f1dc5208 (patch)
tree6d255e27301908568620b0e7e54c916928fe9ba3 /server/src/method/textDocument
parent50701d2c557c61870bafcc46ef35e191a23ad573 (diff)
downloadlua-language-server-24243540681b97956ef29a6bec9d94a6f1dc5208.zip
修正bug
Diffstat (limited to 'server/src/method/textDocument')
-rw-r--r--server/src/method/textDocument/definition.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/method/textDocument/definition.lua b/server/src/method/textDocument/definition.lua
index 10f11f91..f6557061 100644
--- a/server/src/method/textDocument/definition.lua
+++ b/server/src/method/textDocument/definition.lua
@@ -9,8 +9,8 @@ return function (lsp, params)
return nil, '找不到文件:' .. uri
end
-- lua是从1开始的,因此都要+1
- local position = lines:position(params.position.line + 1, params.position.character + 1)
- local suc, results = matcher.definition(ast, position, 'utf8')
+ local position = lines:position(params.position.line + 1, params.position.character + 1, 'utf8')
+ local suc, results = matcher.definition(ast, position)
if not suc then
return {}
end