summaryrefslogtreecommitdiff
path: root/script/core/completion/completion.lua
diff options
context:
space:
mode:
authorKevin Hahn <hahn.kev@gmail.com>2022-06-27 12:32:29 +0700
committerKevin Hahn <hahn.kev@gmail.com>2022-06-27 14:14:36 +0700
commitbd517b96174441ace37885353d5570f2d11e6404 (patch)
treef4bc4b493378f9e1abbdc380c249f7d982783ab5 /script/core/completion/completion.lua
parenteb6165ea4cafe386d8aa38f7ad33a40e14d404fe (diff)
downloadlua-language-server-bd517b96174441ace37885353d5570f2d11e6404.zip
fix some cases where we would return emus twice or would screw up other completions
Diffstat (limited to 'script/core/completion/completion.lua')
-rw-r--r--script/core/completion/completion.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua
index b8e863cc..815b00fd 100644
--- a/script/core/completion/completion.lua
+++ b/script/core/completion/completion.lua
@@ -1524,6 +1524,9 @@ local function tryArray(state, position, results)
if source.type ~= 'table' then
tbl = source.parent
end
+ if source.parent.type == 'callargs' and source.parent.parent.type == 'call' then
+ return
+ end
-- { } inside when enum
checkEqualEnumLeft(state, position, tbl, results, true)
end