summaryrefslogtreecommitdiff
path: root/script/parser/guide.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-02 21:54:56 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-02 21:54:56 +0800
commit06b7670da978254be0c9d6727b23e6076ab54d48 (patch)
tree4359d135ed16ccf30bdf4a6ea1002c67f8525e65 /script/parser/guide.lua
parent62f15442152461495afcebcc0d0b048f3eacc96b (diff)
downloadlua-language-server-06b7670da978254be0c9d6727b23e6076ab54d48.zip
fix error search by doc.return
Diffstat (limited to 'script/parser/guide.lua')
-rw-r--r--script/parser/guide.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index 71be1a27..0ee5fb21 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -1565,8 +1565,9 @@ function m.checkSameSimpleByDoc(status, obj, start, queue, mode)
force = true,
}
end
- if mode == 'ref' then
- m.checkSameSimpleOfRefByDocSource(status, m.getDocState(obj), start, queue, mode)
+ local state = m.getDocState(obj)
+ if state.type == 'doc.type' and mode == 'ref' then
+ m.checkSameSimpleOfRefByDocSource(status, state, start, queue, mode)
end
return true
elseif obj.type == 'doc.field' then