mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
fix: make nvim_cmd not suppress errors inside key mapping
Closes #18632
This commit is contained in:
@@ -3636,5 +3636,13 @@ describe('API', function()
|
||||
meths.cmd({ cmd = "update" }, {})
|
||||
meths.cmd({ cmd = "buffer", count = 0 }, {})
|
||||
end)
|
||||
it('doesn\'t suppress errors when used in keymapping', function()
|
||||
meths.exec_lua([[
|
||||
vim.keymap.set("n", "[l",
|
||||
function() vim.api.nvim_cmd({ cmd = "echo", args = {"foo"} }, {}) end)
|
||||
]], {})
|
||||
feed("[l")
|
||||
neq(nil, string.find(eval("v:errmsg"), "E5108:"))
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user