summaryrefslogtreecommitdiffstats
path: root/src/misc1.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-02-13 12:26:14 +0100
committerBram Moolenaar <Bram@vim.org>2018-02-13 12:26:14 +0100
commitb48e96f61c87a64e38e3ac50732c92a84a4833b8 (patch)
tree170cf91f5865fda3f985328c50b5d009e5296a3b /src/misc1.c
parent294959528e02403cd7ef6541208835f0c621c63b (diff)
patch 8.0.1510: cannot test if a command causes a beepv8.0.1510
Problem: Cannot test if a command causes a beep. Solution: Add assert_beeps().
Diffstat (limited to 'src/misc1.c')
-rw-r--r--src/misc1.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/misc1.c b/src/misc1.c
index 821869aa32..e639fbe41b 100644
--- 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));