diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-01-05 20:10:01 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-01-05 20:10:01 +0800 |
commit | a6cfc1162c24e1621076bc96b36768873bbaf9d4 (patch) | |
tree | c6147758bb13a46f3c3b81538b40fd83ee05d4d7 | |
parent | eec9fdc3958727afa740fa844eba7955072d3e24 (diff) | |
download | lua-language-server-a6cfc1162c24e1621076bc96b36768873bbaf9d4.zip |
fix
-rw-r--r-- | script/vm/getGlobals.lua | 8 |
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) |