fix(lua): preserve argument lists which are not lists

This commit is contained in:
Björn Linse
2021-08-07 21:17:45 +02:00
parent 636ecd0c3b
commit 6896d22b63
3 changed files with 30 additions and 2 deletions

View File

@@ -273,8 +273,8 @@ end
---@see |vim.in_fast_event()|
function vim.schedule_wrap(cb)
return (function (...)
local args = {...}
vim.schedule(function() cb(unpack(args)) end)
local args = vim.F.pack_len(...)
vim.schedule(function() cb(vim.F.unpack_len(args)) end)
end)
end