summaryrefslogtreecommitdiff
path: root/script-beta/core/definition.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-08-25 19:40:19 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-08-25 19:40:19 +0800
commit8ab3e8e15ca366db726fc44c8bfacbb322f595aa (patch)
treec9c5db19c38902a807e06cae1c3ae4d5f6545ea4 /script-beta/core/definition.lua
parent788f36ad222c2a734f1fde17f37644dc7d1d1505 (diff)
downloadlua-language-server-8ab3e8e15ca366db726fc44c8bfacbb322f595aa.zip
修正一些错误
Diffstat (limited to 'script-beta/core/definition.lua')
-rw-r--r--script-beta/core/definition.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script-beta/core/definition.lua b/script-beta/core/definition.lua
index 0761557d..62643861 100644
--- a/script-beta/core/definition.lua
+++ b/script-beta/core/definition.lua
@@ -118,6 +118,9 @@ return function (uri, offset)
vm.setSearchLevel(10)
vm.eachDef(source, function (src)
src = src.field or src.method or src.index or src
+ if src.type == 'table' and src.parent.type ~= 'return' then
+ return
+ end
results[#results+1] = {
target = src,
uri = guide.getRoot(src).uri,