summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-02-02 15:45:07 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-02-02 15:45:07 +0800
commit36ed61dc66433c13c99feb9d3650b31792454615 (patch)
tree62ffba89f4a4797b4553e75dd924a9b96c780ee6 /script
parente28d88a96995c617427534e93cf7affcd202f8e2 (diff)
downloadlua-language-server-36ed61dc66433c13c99feb9d3650b31792454615.zip
fix #1871
Diffstat (limited to 'script')
-rw-r--r--script/vm/compiler.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 4f97b0e0..6e76f470 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -192,11 +192,11 @@ local searchFieldSwitch = util.switch()
or not math.tointeger(key) then
return
end
- pushResult(source.node)
+ pushResult(source.node, true)
end
if type(key) == 'table' then
if vm.isSubType(suri, key, 'integer') then
- pushResult(source.node)
+ pushResult(source.node, true)
end
end
end)
@@ -217,21 +217,21 @@ local searchFieldSwitch = util.switch()
or (fn.name == 'number' and type(key) == 'number')
or (fn.name == 'integer' and math.tointeger(key))
or (fn.name == 'string' and type(key) == 'string') then
- pushResult(field)
+ pushResult(field, true)
end
elseif fn.type == 'doc.type.string'
or fn.type == 'doc.type.integer'
or fn.type == 'doc.type.boolean' then
if key == vm.ANY
or fn[1] == key then
- pushResult(field)
+ pushResult(field, true)
end
end
end
end
if fieldKey.type == 'doc.field.name' then
if key == vm.ANY or fieldKey[1] == key then
- pushResult(field)
+ pushResult(field, true)
end
end
end