summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-01-05 20:10:01 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-01-05 20:10:01 +0800
commita6cfc1162c24e1621076bc96b36768873bbaf9d4 (patch)
treec6147758bb13a46f3c3b81538b40fd83ee05d4d7
parenteec9fdc3958727afa740fa844eba7955072d3e24 (diff)
downloadlua-language-server-a6cfc1162c24e1621076bc96b36768873bbaf9d4.zip
fix
-rw-r--r--script/vm/getGlobals.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/script/vm/getGlobals.lua b/script/vm/getGlobals.lua
index 86e8dbb5..8cec1b07 100644
--- a/script/vm/getGlobals.lua
+++ b/script/vm/getGlobals.lua
@@ -221,13 +221,21 @@ files.watch(function (ev, uri)
if globalSubscribe[uri] then
for _, name in ipairs(globalSubscribe[uri]) do
getGlobalCache[name] = nil
+ getGlobalCache['*'] = nil
end
end
if globalSetsSubscribe[uri] then
for _, name in ipairs(globalSetsSubscribe[uri]) do
getGlobalSetsCache[name] = nil
+ getGlobalSetsCache['*'] = nil
end
end
+ for name in pairs(getGlobalsOfFile(uri)) do
+ getGlobalCache[name] = nil
+ end
+ for name in pairs(getGlobalSetsOfFile(uri)) do
+ getGlobalSetsCache[name] = nil
+ end
end
end)