diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-05-20 14:22:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-20 14:22:44 +0200 |
commit | 1d160a76ec46e7eb4cfa627fb85987059fae55c4 (patch) | |
tree | a4b9e2aa2303970ea1af9012ea07704ab03de413 /test/functional/api/vim_spec.lua | |
parent | a4862cbb5fe4fb368a679adf198506a56a104413 (diff) | |
parent | fb8fa004d8c91b7b591509539a228e97ebc57d9d (diff) | |
download | rneovim-1d160a76ec46e7eb4cfa627fb85987059fae55c4.tar.gz rneovim-1d160a76ec46e7eb4cfa627fb85987059fae55c4.tar.bz2 rneovim-1d160a76ec46e7eb4cfa627fb85987059fae55c4.zip |
Merge pull request #18641 from famiu/fix/nvim_cmd/keymap_error_suppress
fix: make `nvim_cmd` not suppress errors inside key mapping
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r-- | test/functional/api/vim_spec.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index c4748cc00d..c5e8cfee23 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -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) |