diff options
Diffstat (limited to 'server/src/method')
-rw-r--r-- | server/src/method/textDocument/definition.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/method/textDocument/definition.lua b/server/src/method/textDocument/definition.lua index d44ec1f6..a40c1832 100644 --- a/server/src/method/textDocument/definition.lua +++ b/server/src/method/textDocument/definition.lua @@ -2,13 +2,13 @@ local matcher = require 'matcher' return function (lsp, params) local uri = params.textDocument.uri - local results, lines = lsp:loadText(uri) - if not results then + local vm, lines = lsp:loadText(uri) + if not vm then return {} end -- lua是从1开始的,因此都要+1 local position = lines:position(params.position.line + 1, params.position.character + 1) - local positions = matcher.definition(results, position) + local positions = matcher.definition(vm, position) if not positions then return {} end |