Mercurial > vim
diff src/misc1.c @ 13272:abaebba89fd4 v8.0.1510
patch 8.0.1510: cannot test if a command causes a beep
commit https://github.com/vim/vim/commit/b48e96f61c87a64e38e3ac50732c92a84a4833b8
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 13 12:26:14 2018 +0100
patch 8.0.1510: cannot test if a command causes a beep
Problem: Cannot test if a command causes a beep.
Solution: Add assert_beeps().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 13 Feb 2018 12:30:07 +0100 |
parents | ac42c4b11dbc |
children | 65c3e8259124 |
line wrap: on
line diff
--- a/src/misc1.c +++ b/src/misc1.c @@ -3688,6 +3688,10 @@ beep_flush(void) vim_beep( unsigned val) /* one of the BO_ values, e.g., BO_OPER */ { +#ifdef FEAT_EVAL + called_vim_beep = TRUE; +#endif + if (emsg_silent == 0) { if (!((bo_flags & val) || (bo_flags & BO_ALL))) @@ -3718,8 +3722,9 @@ vim_beep( #endif } - /* When 'verbose' is set and we are sourcing a script or executing a - * function give the user a hint where the beep comes from. */ + /* When 'debug' contains "beep" produce a message. If we are sourcing + * a script or executing a function give the user a hint where the beep + * comes from. */ if (vim_strchr(p_debug, 'e') != NULL) { msg_source(HL_ATTR(HLF_W));