mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
vim-patch:8.2.3306: unexpected "No matching autocommands" (#17912)
Problem: Unexpected "No matching autocommands".
Solution: Do not give the message when aborting. Mention the arguments in
the message. (closes vim/vim#8690)
1b154ea121
This commit is contained in:
@@ -1191,8 +1191,9 @@ char_u *aucmd_next_pattern(char_u *pat, size_t patlen)
|
||||
/// Return OK for success, FAIL for failure;
|
||||
///
|
||||
/// @param do_msg give message for no matching autocmds?
|
||||
int do_doautocmd(char_u *arg, bool do_msg, bool *did_something)
|
||||
int do_doautocmd(char_u *arg_start, bool do_msg, bool *did_something)
|
||||
{
|
||||
char_u *arg = arg_start;
|
||||
int nothing_done = true;
|
||||
|
||||
if (did_something != NULL) {
|
||||
@@ -1224,8 +1225,8 @@ int do_doautocmd(char_u *arg, bool do_msg, bool *did_something)
|
||||
}
|
||||
}
|
||||
|
||||
if (nothing_done && do_msg) {
|
||||
msg(_("No matching autocommands"));
|
||||
if (nothing_done && do_msg && !aborting()) {
|
||||
smsg(_("No matching autocommands: %s"), arg_start);
|
||||
}
|
||||
if (did_something != NULL) {
|
||||
*did_something = !nothing_done;
|
||||
|
Reference in New Issue
Block a user