summaryrefslogtreecommitdiff
path: root/script/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-22 14:32:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-22 14:32:11 +0800
commite7c4777ace613736d101927ccc6f5c877f89a611 (patch)
tree6beb04d45d4ff4505ff5a138c137e8b43e63d2f7 /script/vm
parentad535a757d103803263af403b463f5201b22c3f0 (diff)
downloadlua-language-server-e7c4777ace613736d101927ccc6f5c877f89a611.zip
fix
Diffstat (limited to 'script/vm')
-rw-r--r--script/vm/compiler.lua14
1 files changed, 9 insertions, 5 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index ecaa57dc..795113e0 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -121,17 +121,21 @@ local searchFieldSwitch = util.switch()
if not fields then
return
end
- local hasMarkDoc
+ local hasMarkDoc = {}
for _, src in ipairs(fields) do
if src.bindDocs then
if bindDocs(src) then
- hasMarkDoc = true
- pushResult(src, hasMarkDoc)
+ local skey = guide.getKeyName(src)
+ if skey then
+ hasMarkDoc[skey] = true
+ end
+ pushResult(src, true)
end
end
end
- if not hasMarkDoc then
- for _, src in ipairs(fields) do
+ for _, src in ipairs(fields) do
+ local skey = guide.getKeyName(src)
+ if not hasMarkDoc[skey] then
pushResult(src)
end
end