diff options
Diffstat (limited to 'script/core/searcher.lua')
-rw-r--r-- | script/core/searcher.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua index 8c9f91e2..6ea15d97 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -84,6 +84,20 @@ local pushDefResultsMap = util.switch() : case 'local' : case 'setlocal' : case 'setglobal' + : call(function (source, status) + if source.type ~= 'local' then + source = source.node + end + if source[1] == 'self' + and source.parent.type == 'funcargs' then + local func = source.parent.parent + if status.source.start < func.start + or status.source.start > func.finish then + return false + end + end + return true + end) : case 'label' : case 'setfield' : case 'setmethod' |