From 5b6a3da07d96345073a275e5e298d83ab3b5ead9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 11 Dec 2018 16:27:03 +0800 Subject: =?UTF-8?q?=E8=BD=AC=E5=88=B0=E5=AE=9A=E4=B9=89=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E7=94=A8=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/method/textDocument/implementation.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/src/method/textDocument/implementation.lua') diff --git a/server/src/method/textDocument/implementation.lua b/server/src/method/textDocument/implementation.lua index 07d48870..4d77882d 100644 --- a/server/src/method/textDocument/implementation.lua +++ b/server/src/method/textDocument/implementation.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.implementation(results, position) + local positions = matcher.implementation(vm.results, position) if not positions then return {} end -- cgit v1.2.3