diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2022-05-02 10:39:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-02 16:39:05 +0800 |
commit | 1e970c003f4bda5723bbcbc32cf586958370223b (patch) | |
tree | d748093b11e6238acb378b39b2361f58b7df3c02 /src | |
parent | a23440bf7cf5102f18092bb4239c198e217bf928 (diff) | |
download | rneovim-1e970c003f4bda5723bbcbc32cf586958370223b.tar.gz rneovim-1e970c003f4bda5723bbcbc32cf586958370223b.tar.bz2 rneovim-1e970c003f4bda5723bbcbc32cf586958370223b.zip |
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 (limited to 'src')
-rw-r--r-- | src/nvim/autocmd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c index bfeb70dce9..9bc0a4fabf 100644 --- 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; |