diff options
-rw-r--r-- | script/core/searcher.lua | 5 | ||||
-rw-r--r-- | test/hover/init.lua | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua index ad51a412..972350fd 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -641,7 +641,10 @@ end local function getField(status, source, mode) if source.type == 'table' then for _, field in ipairs(source) do - m.pushResult(status, mode, field) + if field.type == 'tablefield' + or field.type == 'tableindex' then + m.pushResult(status, mode, field) + end end return end diff --git a/test/hover/init.lua b/test/hover/init.lua index 2c68fef5..515c3422 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -831,6 +831,17 @@ global _G: _G { ]] TEST [[ +local <?t?> = { + 'aaa', + 'bbb', + 'ccc', +} +]] +[[ +local t: {} +]] + +TEST [[ local x x = 1 x = 1.0 |