1
0
forked from aniani/vim

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().
This commit is contained in:
Bram Moolenaar
2018-02-13 12:26:14 +01:00
parent 294959528e
commit b48e96f61c
9 changed files with 65 additions and 2 deletions

View File

@@ -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));