From 1bb4040b7ff975f20ec151d6b97ecf6e044bfb2a 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, 17 Nov 2020 14:48:16 +0800 Subject: =?UTF-8?q?hover=E6=97=B6=E8=8B=A5=20x.y=20=E4=B8=AD=E7=9A=84x?= =?UTF-8?q?=E6=98=AF=E5=85=A8=E5=B1=80=E5=8F=98=E9=87=8F=EF=BC=8C=E5=88=99?= =?UTF-8?q?=E4=B8=8D=E6=89=BEx=E7=9A=84class?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/core/hover/name.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'script-beta/core') diff --git a/script-beta/core/hover/name.lua b/script-beta/core/hover/name.lua index 230de253..e5bd6f66 100644 --- a/script-beta/core/hover/name.lua +++ b/script-beta/core/hover/name.lua @@ -17,12 +17,12 @@ local function asLocal(source) end local function asField(source, oop) - local class = vm.getClass(source.node, 'deep') + local class + if source.node.type ~= 'getglobal' then + class = vm.getClass(source.node, 'deep') + end local node = class or guide.getName(source.node) or '?' local method = guide.getName(source) - if node:sub(-1) == '*' then - node = node:sub(1, -2) - end if oop then return ('%s:%s'):format(node, method) else -- cgit v1.2.3