summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-23 15:58:42 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-23 15:58:42 +0800
commit200067b4d9922335721b54a2d7916bd3e7ba247c (patch)
treeb315d1a85f24c96fb6d368d48e0240178e08bdd7 /script
parent5c48724257e1abdd81eed0d0e72b6a1033571b87 (diff)
downloadlua-language-server-200067b4d9922335721b54a2d7916bd3e7ba247c.zip
fix #406 dont cache infer when not deep
Diffstat (limited to 'script')
-rw-r--r--script/parser/guide.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index c34e65f9..53849a52 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -2937,6 +2937,11 @@ end
function m.getRefCache(status, obj, mode)
local isDeep = status.deep
+ if mode == 'infer' then
+ if not isDeep then
+ return nil, nil
+ end
+ end
local globalCache = status.interface.cache and status.interface.cache() or {}
if m.isGlobal(obj) then
obj = m.getKeyName(obj)