summaryrefslogtreecommitdiff
path: root/script-beta/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-12-11 17:04:43 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-12-11 17:04:43 +0800
commitb07c6d80e23dea035853b89d22513d73df1aadbc (patch)
treea8cd43a2cc732784849698ffd5aca92f2c01db83 /script-beta/core
parente3486e01e820b2d61bf28e57277479ee59ab94b9 (diff)
downloadlua-language-server-b07c6d80e23dea035853b89d22513d73df1aadbc.zip
修正查看库函数引用时的报错
Diffstat (limited to 'script-beta/core')
-rw-r--r--script-beta/core/definition.lua3
-rw-r--r--script-beta/core/reference.lua3
2 files changed, 6 insertions, 0 deletions
diff --git a/script-beta/core/definition.lua b/script-beta/core/definition.lua
index 5f16ad84..77bef643 100644
--- a/script-beta/core/definition.lua
+++ b/script-beta/core/definition.lua
@@ -18,6 +18,9 @@ local function findDef(source, callback)
return
end
vm.eachDef(source, function (info)
+ if info.source.library then
+ return
+ end
if info.mode == 'declare'
or info.mode == 'set'
or info.mode == 'return' then
diff --git a/script-beta/core/reference.lua b/script-beta/core/reference.lua
index 7e265e97..0f4efbfc 100644
--- a/script-beta/core/reference.lua
+++ b/script-beta/core/reference.lua
@@ -28,6 +28,9 @@ local function findRef(source, offset, callback)
return
end
vm.eachRef(source, function (info)
+ if info.source.library then
+ return
+ end
if info.mode == 'declare'
or info.mode == 'set'
or info.mode == 'get'