From d3d520cdb9aa4e30d70ae7bfdf4c939312fc2171 Mon Sep 17 00:00:00 2001 From: sumneko Date: Tue, 7 May 2019 20:45:28 +0800 Subject: =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/definition.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'server/src') diff --git a/server/src/core/definition.lua b/server/src/core/definition.lua index c2a29dae..c8b0d116 100644 --- a/server/src/core/definition.lua +++ b/server/src/core/definition.lua @@ -56,13 +56,22 @@ local function parseValueByValue(callback, vm, source, value) for _ = 1, 5 do value:eachInfo(function (info, src) if Mode == 'definition' then - if info.type == 'set' or info.type == 'local' then + if info.type == 'local' then if vm.uri == src:getUri() then if source.id >= src.id then callback(src) end end end + if info.type == 'set' then + if vm.uri == src:getUri() then + if source.id >= src.id then + callback(src) + end + else + callback(src) + end + end if info.type == 'return' then if (src.type ~= 'simple' or src[#src].type == 'call') and src.type ~= 'name' -- cgit v1.2.3