summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-08-07 13:59:43 +0200
committerBram Moolenaar <Bram@vim.org>2021-08-07 13:59:43 +0200
commit1b154ea121d8374a129c3e30d50fa9742cd5faa1 (patch)
tree9bad643f0d8d001108292e7298970937cfdf13d6
parent84934998806408db3f3ecff7ac4c3980e0c2a96e (diff)
patch 8.2.3306: unexpected "No matching autocommands"v8.2.3306
Problem: Unexpected "No matching autocommands". Solution: Do not give the message when aborting. Mention the arguments in the message. (closes #8690)
-rw-r--r--src/autocmd.c11
-rw-r--r--src/version.c2
2 files changed, 10 insertions, 3 deletions
diff --git a/src/autocmd.c b/src/autocmd.c
index 83e990df01..07681bbe52 100644
--- 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;
diff --git a/src/version.c b/src/version.c
index d1117610f4..652372d0f7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3306,
+/**/
3305,
/**/
3304,