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!".
b6db146762
This commit is contained in:
zeertzjq
2022-10-05 21:30:25 +08:00
parent 824a31cd0d
commit 42afb9153a
3 changed files with 3 additions and 2 deletions

View File

@@ -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);