neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 1e970c003f4bda5723bbcbc32cf586958370223b
parent a23440bf7cf5102f18092bb4239c198e217bf928
Author: dundargoc <33953936+dundargoc@users.noreply.github.com>
Date:   Mon,  2 May 2022 10:39:05 +0200

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)
https://github.com/vim/vim/commit/1b154ea121d8374a129c3e30d50fa9742cd5faa1
Diffstat:
Msrc/nvim/autocmd.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c @@ -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;