diff options
Diffstat (limited to 'script/core/reference.lua')
-rw-r--r-- | script/core/reference.lua | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/script/core/reference.lua b/script/core/reference.lua index efeb28b6..ca067a75 100644 --- a/script/core/reference.lua +++ b/script/core/reference.lua @@ -65,11 +65,23 @@ return function (uri, offset) local metaSource = vm.isMetaFile(uri) + local refs = vm.getRefs(source, 5) + local values = {} + for _, src in ipairs(refs) do + local value = searcher.getObjectValue(src) + if value and value ~= src and guide.isLiteral(value) then + values[value] = true + end + end + local results = {} - for _, src in ipairs(vm.getRefs(source, 5)) do + for _, src in ipairs(refs) do if src.dummy then goto CONTINUE end + if values[src] then + goto CONTINUE + end local root = guide.getRoot(src) if not root then goto CONTINUE |