summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/src/core/definition.lua11
1 files changed, 10 insertions, 1 deletions
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'