mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
vim-patch:8.0.1510: cannot assert beep #9938
Problem: Cannot test if a command causes a beep.
Solution: Add assert_beeps().
b48e96f61c
This commit is contained in:

committed by
Justin M. Keyes

parent
24a9516ff4
commit
9d77a07686
@@ -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));
|
||||
|
Reference in New Issue
Block a user