summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-29 18:13:48 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-29 18:13:48 +0800
commit4429b76d8fe63c5f540478e7e9f123996d6da049 (patch)
treecb2e9208fe3680523321ddc31bf5348e895e12ff /server/src
parente155e1462e613d347195f950696c4ad511358123 (diff)
downloadlua-language-server-4429b76d8fe63c5f540478e7e9f123996d6da049.zip
修正全局变量的诊断问题
Diffstat (limited to 'server/src')
-rw-r--r--server/src/core/diagnostics.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/core/diagnostics.lua b/server/src/core/diagnostics.lua
index 089ff352..2e0e0066 100644
--- a/server/src/core/diagnostics.lua
+++ b/server/src/core/diagnostics.lua
@@ -47,6 +47,9 @@ function mt:searchUndefinedGlobal(callback)
if field.value.lib then
goto NEXT_VAR
end
+ if field.source.uri ~= self.vm.uri then
+ goto NEXT_VAR
+ end
if type(index) ~= 'string' then
goto NEXT_VAR
end
@@ -56,7 +59,7 @@ function mt:searchUndefinedGlobal(callback)
if index == '' then
goto NEXT_VAR
end
- local ok = self.vm:eachInfo(field, function (info)
+ local ok = field.value:eachInfo(function (info)
if info.type == 'set' then
return true
end