diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-29 18:13:48 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-29 18:13:48 +0800 |
commit | 4429b76d8fe63c5f540478e7e9f123996d6da049 (patch) | |
tree | cb2e9208fe3680523321ddc31bf5348e895e12ff /server/src | |
parent | e155e1462e613d347195f950696c4ad511358123 (diff) | |
download | lua-language-server-4429b76d8fe63c5f540478e7e9f123996d6da049.zip |
修正全局变量的诊断问题
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/core/diagnostics.lua | 5 |
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 |