Mercurial > vim
changeset 25539:ddc223a7f5f5 v8.2.3306
patch 8.2.3306: unexpected "No matching autocommands"
Commit: https://github.com/vim/vim/commit/1b154ea121d8374a129c3e30d50fa9742cd5faa1
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 7 13:59:43 2021 +0200
patch 8.2.3306: unexpected "No matching autocommands"
Problem: Unexpected "No matching autocommands".
Solution: Do not give the message when aborting. Mention the arguments in
the message. (closes #8690)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 07 Aug 2021 14:00:05 +0200 |
parents | e53a494dbfff |
children | 94ba2bb5b357 |
files | src/autocmd.c src/version.c |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/autocmd.c +++ b/src/autocmd.c @@ -1287,10 +1287,11 @@ do_autocmd_event( */ int do_doautocmd( - char_u *arg, + char_u *arg_start, int do_msg, // give message for no matching autocmds? int *did_something) { + char_u *arg = arg_start; char_u *fname; int nothing_done = TRUE; int group; @@ -1329,8 +1330,12 @@ do_doautocmd( fname, NULL, TRUE, group, curbuf, NULL)) nothing_done = FALSE; - if (nothing_done && do_msg) - msg(_("No matching autocommands")); + if (nothing_done && do_msg +#ifdef FEAT_EVAL + && !aborting() +#endif + ) + smsg(_("No matching autocommands: %s"), arg_start); if (did_something != NULL) *did_something = !nothing_done;