summaryrefslogtreecommitdiff
path: root/server/src/core/definition.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/core/definition.lua')
-rw-r--r--server/src/core/definition.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/src/core/definition.lua b/server/src/core/definition.lua
index 9b9cd75e..35dfc03b 100644
--- a/server/src/core/definition.lua
+++ b/server/src/core/definition.lua
@@ -6,14 +6,20 @@ local function parseValueSimily(vm, source, lsp)
local positions = {}
for _, other in ipairs(vm.sources) do
if other == source then
- break
+ goto CONTINUE
end
- if other[1] == key and not other:bindLocal() and other:bindValue() and other:action() == 'set' then
+ if other[1] == key
+ and not other:bindLocal()
+ and other:bindValue()
+ and other:action() == 'set'
+ and source:bindValue() ~= other:bindValue()
+ then
positions[#positions+1] = {
other.start,
other.finish,
}
end
+ :: CONTINUE ::
end
if #positions == 0 then
return nil