mirror of
https://github.com/neovim/neovim.git
synced 2025-11-17 15:51:32 +00:00
perf(validate): use lighter version
- Also fix `vim.validate()` for PUC Lua when showing errors for values that aren't string or number.
This commit is contained in:
committed by
Lewis Russell
parent
fa6ab0d909
commit
3f3e4837d5
@@ -309,11 +309,9 @@ end
|
||||
--- @param on_exit? fun(out: vim.SystemCompleted)
|
||||
--- @return vim.SystemObj
|
||||
function M.run(cmd, opts, on_exit)
|
||||
vim.validate({
|
||||
cmd = { cmd, 'table' },
|
||||
opts = { opts, 'table', true },
|
||||
on_exit = { on_exit, 'function', true },
|
||||
})
|
||||
vim.validate('cmd', cmd, 'table')
|
||||
vim.validate('opts', opts, 'table', true)
|
||||
vim.validate('on_exit', on_exit, 'function', true)
|
||||
|
||||
opts = opts or {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user