From d1d6456378664a36a99094ddeb6b0c28f0449d72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 12 Dec 2018 16:14:15 +0800 Subject: =?UTF-8?q?=E6=81=A2=E5=A4=8Dhover?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/matcher/hover.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'server/src/matcher') diff --git a/server/src/matcher/hover.lua b/server/src/matcher/hover.lua index 9faa426b..12d599b3 100644 --- a/server/src/matcher/hover.lua +++ b/server/src/matcher/hover.lua @@ -160,17 +160,13 @@ local function buildTableHover(lib, fullKey) ]]):format(title, tip, field) end -return function (results, pos) - local result = findResult(results, pos) +return function (vm, pos) + local result = findResult(vm.results, pos) if not result then return nil end - if result.type ~= 'var' then - return nil - end - local var = result.var - local lib, fullKey, oo = findLib(var) + local lib, fullKey, oo = findLib(result.object) if not lib then return nil end -- cgit v1.2.3