aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/misc1.c
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johanhelsing@gmail.com>2015-10-16 21:28:12 +0200
committerJohan Klokkhammer Helsing <johanhelsing@gmail.com>2015-10-18 01:58:18 +0200
commit3bb266266935e9bf95f4a776b33800b9303d4607 (patch)
tree305b7e72e04b30be2ed052df262ab6b771e7469d /src/nvim/misc1.c
parente9de70e4ea53cd7ab70eba0757309004c61c3c62 (diff)
downloadrneovim-3bb266266935e9bf95f4a776b33800b9303d4607.tar.gz
rneovim-3bb266266935e9bf95f4a776b33800b9303d4607.tar.bz2
rneovim-3bb266266935e9bf95f4a776b33800b9303d4607.zip
vim-patch:7.4.793
Problem: Can't specify when not to ring the bell. Solution: Add the 'belloff' option. (Christian Brabandt) https://github.com/vim/vim/commit/165bc69d1b7f70ca9d5b657f35d0584ecb7b5183
Diffstat (limited to 'src/nvim/misc1.c')
-rw-r--r--src/nvim/misc1.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c
index 1f1b5c2aa9..6829e4988c 100644
--- a/src/nvim/misc1.c
+++ b/src/nvim/misc1.c
@@ -2582,21 +2582,22 @@ void msgmore(long n)
void beep_flush(void)
{
if (emsg_silent == 0) {
- flush_buffers(FALSE);
- vim_beep();
+ flush_buffers(false);
+ vim_beep(BO_ERROR);
}
}
-/*
- * give a warning for an error
- */
-void vim_beep(void)
+// Give a warning for an error
+// val is one of the BO_ values, e.g., BO_OPER
+void vim_beep(unsigned val)
{
if (emsg_silent == 0) {
- if (p_vb) {
- ui_visual_bell();
- } else {
- ui_putc(BELL);
+ if (!((bo_flags & val) || (bo_flags & BO_ALL))) {
+ if (p_vb) {
+ ui_visual_bell();
+ } else {
+ ui_putc(BELL);
+ }
}
/* When 'verbose' is set and we are sourcing a script or executing a