mirror of https://github.com/folke/lazy.nvim.git
fix(cmd): shedule error message instead of showing directly
This commit is contained in:
parent
7613ab2abb
commit
03419f3e5f
|
@ -35,7 +35,10 @@ function M:_add(cmd)
|
||||||
|
|
||||||
local info = vim.api.nvim_get_commands({})[cmd] or vim.api.nvim_buf_get_commands(0, {})[cmd]
|
local info = vim.api.nvim_get_commands({})[cmd] or vim.api.nvim_buf_get_commands(0, {})[cmd]
|
||||||
if not info then
|
if not info then
|
||||||
return Util.error("Command `" .. cmd .. "` not found after loading " .. plugins)
|
vim.schedule(function()
|
||||||
|
Util.error("Command `" .. cmd .. "` not found after loading " .. plugins)
|
||||||
|
end)
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
command.nargs = info.nargs
|
command.nargs = info.nargs
|
||||||
|
|
Loading…
Reference in New Issue