summaryrefslogtreecommitdiff
path: root/script/vm/def.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/vm/def.lua')
-rw-r--r--script/vm/def.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/script/vm/def.lua b/script/vm/def.lua
index a7af29b2..f557f221 100644
--- a/script/vm/def.lua
+++ b/script/vm/def.lua
@@ -102,9 +102,15 @@ local nodeSwitch;nodeSwitch = util.switch()
if lastKey then
return
end
- local tbl = source.parent
+ local key = guide.getKeyName(source)
+ if type(key) ~= 'string' then
+ return
+ end
local uri = guide.getUri(source)
- searchFieldSwitch(tbl.type, uri, tbl, guide.getKeyName(source), pushResult)
+ local parentNode = vm.compileNode(source.node)
+ for pn in parentNode:eachObject() do
+ searchFieldSwitch(pn.type, uri, pn, key, pushResult)
+ end
end)
: case 'doc.see.field'
: call(function (source, lastKey, pushResult)