diff options
Diffstat (limited to 'script/core/searcher.lua')
-rw-r--r-- | script/core/searcher.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua index 3c210b1b..f2b9b291 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -17,6 +17,7 @@ local next = next local error = error local type = type local setmetatable = setmetatable +local ipairs = ipairs local tconcat = table.concat local ssub = string.sub local sfind = string.find @@ -975,6 +976,22 @@ local function prepareSearch(source) end local uri = getUri(source) local id = getID(source) + -- return function + if source.type == 'function' and source.parent.type == 'return' then + local func = guide.getParentFunction(source) + if func.type == 'function' then + for index, rtn in ipairs(source.parent) do + if rtn == source then + id = sformat('%s%s%s' + , getID(func) + , RETURN_INDEX + , index + ) + break + end + end + end + end return uri, id end |