summaryrefslogtreecommitdiff
path: root/script-beta/core/diagnostics/undefined-global.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-09-19 09:30:46 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-09-19 09:30:46 +0800
commit3f10b39b568295a2f31f3b5bf7f84022dc763f60 (patch)
tree452d2c6462d35fbc2da47ac85f4280ff4da72ac1 /script-beta/core/diagnostics/undefined-global.lua
parent138adf804985b0343f15c1d8c464bdb1c2b6c69d (diff)
downloadlua-language-server-3f10b39b568295a2f31f3b5bf7f84022dc763f60.zip
全局变量做单独的缓存
Diffstat (limited to 'script-beta/core/diagnostics/undefined-global.lua')
-rw-r--r--script-beta/core/diagnostics/undefined-global.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/script-beta/core/diagnostics/undefined-global.lua b/script-beta/core/diagnostics/undefined-global.lua
index e287fefa..9ef80182 100644
--- a/script-beta/core/diagnostics/undefined-global.lua
+++ b/script-beta/core/diagnostics/undefined-global.lua
@@ -23,8 +23,7 @@ return function (uri, callback)
if library.global[key] then
return
end
- local sets = vm.getGlobalSets(guide.getKeyName(src))
- if #sets > 0 then
+ if #vm.getGlobalSets(guide.getKeyName(src)) > 0 then
return
end
local message = lang.script('DIAG_UNDEF_GLOBAL', key)