diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-08-05 03:33:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-05 03:33:45 +0200 |
commit | 45c34bd84aa512b262f9d60e3f25f547cb5c189a (patch) | |
tree | 71f59a64ff19b34029aedc4eec1ee26d3dcc8c74 /test | |
parent | 01ddb39699c2d84386c2a08c94ee9c175917a4ef (diff) | |
download | rneovim-45c34bd84aa512b262f9d60e3f25f547cb5c189a.tar.gz rneovim-45c34bd84aa512b262f9d60e3f25f547cb5c189a.tar.bz2 rneovim-45c34bd84aa512b262f9d60e3f25f547cb5c189a.zip |
:doautocmd : Never show "No matching autocommands" #10689
The message is useless, it doesn't even mention the event name.
vim_dev discussion:
https://groups.google.com/forum/#!msg/vim_dev/RTbq58TMq9w/Xr4rSoUTCgAJ
ref: https://github.com/vim/vim/issues/4300
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/autocmd/autocmd_spec.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/autocmd/autocmd_spec.lua b/test/functional/autocmd/autocmd_spec.lua index 20538d7141..0a583b6d8d 100644 --- a/test/functional/autocmd/autocmd_spec.lua +++ b/test/functional/autocmd/autocmd_spec.lua @@ -260,4 +260,26 @@ describe('autocmd', function() eq({false, 'Vim(call):E5555: API call: Invalid window id'}, meth_pcall(command, "call nvim_set_current_win(g:winid)")) end) + + it(':doautocmd does not warn "No matching autocommands" #10689', function() + local screen = Screen.new(32, 3) + screen:attach() + screen:set_default_attr_ids({ + [1] = {bold = true, foreground = Screen.colors.Blue1}, + }) + + feed(':doautocmd User Foo<cr>') + screen:expect{grid=[[ + ^ | + {1:~ }| + :doautocmd User Foo | + ]]} + feed(':autocmd! SessionLoadPost<cr>') + feed(':doautocmd SessionLoadPost<cr>') + screen:expect{grid=[[ + ^ | + {1:~ }| + :doautocmd SessionLoadPost | + ]]} + end) end) |