diff options
Diffstat (limited to 'script/core/completion')
-rw-r--r-- | script/core/completion/postfix.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/script/core/completion/postfix.lua b/script/core/completion/postfix.lua index 1331a0e4..b5f33315 100644 --- a/script/core/completion/postfix.lua +++ b/script/core/completion/postfix.lua @@ -220,6 +220,24 @@ register 'pairs' { end } +register 'unpack' { + function (state, source, callback) + if source.type ~= 'getglobal' + and source.type ~= 'getfield' + and source.type ~= 'getmethod' + and source.type ~= 'getindex' + and source.type ~= 'getlocal' + and source.type ~= 'call' + and source.type ~= 'table' then + return + end + local subber = subString(state) + callback(string.format('unpack(%s)' + , subber(source.start + 1, source.finish) + )) + end +} + register 'insert' { function (state, source, callback) if source.type ~= 'getglobal' |