diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-04-25 08:31:33 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-04-25 14:31:33 +0200 |
commit | 9d77a0768697aced470c72ba71d0e04cf45f0fd0 (patch) | |
tree | 26d7504ad4d4133ff1cead5d251eab7d1e9e0380 /src/nvim/misc1.c | |
parent | 24a9516ff41b69e649f0dac131ad20efbe19eb4b (diff) | |
download | rneovim-9d77a0768697aced470c72ba71d0e04cf45f0fd0.tar.gz rneovim-9d77a0768697aced470c72ba71d0e04cf45f0fd0.tar.bz2 rneovim-9d77a0768697aced470c72ba71d0e04cf45f0fd0.zip |
vim-patch:8.0.1510: cannot assert beep #9938
Problem: Cannot test if a command causes a beep.
Solution: Add assert_beeps().
https://github.com/vim/vim/commit/b48e96f61c87a64e38e3ac50732c92a84a4833b8
Diffstat (limited to 'src/nvim/misc1.c')
-rw-r--r-- | src/nvim/misc1.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index e5c22e5be3..57285fa252 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -2578,6 +2578,8 @@ void beep_flush(void) // val is one of the BO_ values, e.g., BO_OPER void vim_beep(unsigned val) { + called_vim_beep = true; + if (emsg_silent == 0) { if (!((bo_flags & val) || (bo_flags & BO_ALL))) { if (p_vb) { @@ -2587,8 +2589,9 @@ void vim_beep(unsigned val) } } - /* 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)); msg_attr(_("Beep!"), HL_ATTR(HLF_W)); |