diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-10-05 21:30:25 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-10-05 22:40:28 +0800 |
commit | 42afb9153a8380fdbace81c86f789e7b8af2c65c (patch) | |
tree | cf8ab14d9ca09143da876cfb945707c9af8e3d34 /src/nvim/autocmd.c | |
parent | 824a31cd0d55752b01a9bdd1f38f756e079e25e8 (diff) | |
download | rneovim-42afb9153a8380fdbace81c86f789e7b8af2c65c.tar.gz rneovim-42afb9153a8380fdbace81c86f789e7b8af2c65c.tar.bz2 rneovim-42afb9153a8380fdbace81c86f789e7b8af2c65c.zip |
vim-patch:8.2.3886: can define autocmd for every event by using "au!"
Problem: Can define autocmd for every event by using "au!".
Solution: Check if a command is present also for "au!".
https://github.com/vim/vim/commit/b6db1467622be046dbf00b2213fd9f49f4f3cccb
Diffstat (limited to 'src/nvim/autocmd.c')
-rw-r--r-- | src/nvim/autocmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c index 1f23e7ab79..439704d120 100644 --- a/src/nvim/autocmd.c +++ b/src/nvim/autocmd.c @@ -881,7 +881,7 @@ void do_autocmd(char *arg_in, int forceit) } } else { if (*arg == '*' || *arg == NUL || *arg == '|') { - if (!forceit && *cmd != NUL) { + if (*cmd != NUL) { emsg(_(e_cannot_define_autocommands_for_all_events)); } else { do_all_autocmd_events(pat, once, nested, cmd, forceit, group); |