]> granicus.if.org Git - vim/commitdiff
patch 8.2.3306: unexpected "No matching autocommands" v8.2.3306
authorBram Moolenaar <Bram@vim.org>
Sat, 7 Aug 2021 11:59:43 +0000 (13:59 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 7 Aug 2021 11:59:43 +0000 (13:59 +0200)
Problem:    Unexpected "No matching autocommands".
Solution:   Do not give the message when aborting.  Mention the arguments in
            the message. (closes #8690)

src/autocmd.c
src/version.c

index 83e990df01abb5a6b6e14ecb24addf8c742bee94..07681bbe5209d286c2f9c4b8f8f85ff0b8c49cf0 100644 (file)
@@ -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;
 
index d1117610f4cad47e5c71953cf30ac8fbadce0931..652372d0f7b6ae9984f2a36e272a91589c1df688 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3306,
 /**/
     3305,
 /**/