diff options
Diffstat (limited to 'server-beta/src/core/definition.lua')
-rw-r--r-- | server-beta/src/core/definition.lua | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/server-beta/src/core/definition.lua b/server-beta/src/core/definition.lua index efee48fb..2f4a2da3 100644 --- a/server-beta/src/core/definition.lua +++ b/server-beta/src/core/definition.lua @@ -4,12 +4,9 @@ local engineer = require 'core.engineer' return function (ast, text, offset) local results = {} local searcher = engineer(ast) - guide.eachSource(offset, function (source) + guide.eachSource(ast.ast, offset, function (source) searcher:eachRef(source, function (src, mode) - if src.start == 0 then - return - end - if mode == 'local' or mode == 'set' then + if mode == 'set' or mode == 'local' then results[#results+1] = { uri = ast.uri, source = source, |