fix(cmd): lazy-cmds no longer show an error for buffer-local commands

This commit is contained in:
Folke Lemaitre 2023-10-14 17:30:24 +02:00
parent a993bfd6de
commit 3b31897275
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ function M:_add(cmd)
self:_load(cmd)
local info = vim.api.nvim_get_commands({})[cmd]
local info = vim.api.nvim_get_commands({})[cmd] or vim.api.nvim_buf_get_commands(0, {})[cmd]
if not info then
return Util.error("Command `" .. cmd .. "` not found after loading " .. plugins)
end