This commit is contained in:
Damian Senn 2024-06-20 12:02:40 +02:00 committed by GitHub
commit 01c7f7f4eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -93,7 +93,9 @@ return setmetatable({
end
local command = k:gsub("_$", "!")
local f = function(...)
return vim.api.nvim_command(table.concat(vim.tbl_flatten {command, ...}, " "))
local cmd = {command, ...}
cmd = vim.iter and vim.iter(cmd):flatten():totable() or vim.tbl_flatten(cmd)
return vim.api.nvim_command(table.concat(cmd, " "))
end
mt[k] = f
return f