diff options
author | Johan Klokkhammer Helsing <johanhelsing@gmail.com> | 2015-10-16 21:28:12 +0200 |
---|---|---|
committer | Johan Klokkhammer Helsing <johanhelsing@gmail.com> | 2015-10-18 01:58:18 +0200 |
commit | 3bb266266935e9bf95f4a776b33800b9303d4607 (patch) | |
tree | 305b7e72e04b30be2ed052df262ab6b771e7469d /src/nvim/normal.c | |
parent | e9de70e4ea53cd7ab70eba0757309004c61c3c62 (diff) | |
download | rneovim-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/normal.c')
-rw-r--r-- | src/nvim/normal.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 5354fb20ad..713aa55500 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -1534,7 +1534,7 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank) case OP_DELETE: VIsual_reselect = false; /* don't reselect now */ if (empty_region_error) { - vim_beep(); + vim_beep(BO_OPER); CancelRedo(); } else { (void)op_delete(oap); @@ -1547,7 +1547,7 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank) case OP_YANK: if (empty_region_error) { if (!gui_yank) { - vim_beep(); + vim_beep(BO_OPER); CancelRedo(); } } else { @@ -1560,7 +1560,7 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank) case OP_CHANGE: VIsual_reselect = false; /* don't reselect now */ if (empty_region_error) { - vim_beep(); + vim_beep(BO_OPER); CancelRedo(); } else { /* This is a new edit command, not a restart. Need to @@ -1614,7 +1614,7 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank) case OP_LOWER: case OP_ROT13: if (empty_region_error) { - vim_beep(); + vim_beep(BO_OPER); CancelRedo(); } else op_tilde(oap); @@ -1642,7 +1642,7 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank) case OP_APPEND: VIsual_reselect = false; /* don't reselect now */ if (empty_region_error) { - vim_beep(); + vim_beep(BO_OPER); CancelRedo(); } else { /* This is a new edit command, not a restart. Need to @@ -1671,7 +1671,7 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank) case OP_REPLACE: VIsual_reselect = false; /* don't reselect now */ if (empty_region_error) { - vim_beep(); + vim_beep(BO_OPER); CancelRedo(); } else { // Restore linebreak, so that when the user edits it looks as before. @@ -4040,10 +4040,11 @@ static void nv_exmode(cmdarg_T *cap) /* * Ignore 'Q' in Visual mode, just give a beep. */ - if (VIsual_active) - vim_beep(); - else if (!checkclearop(cap->oap)) + if (VIsual_active) { + vim_beep(BO_EX); + } else if (!checkclearop(cap->oap)) { do_exmode(false); + } } /* @@ -6972,8 +6973,9 @@ static void nv_esc(cmdarg_T *cap) check_cursor_col(); /* make sure cursor is not beyond EOL */ curwin->w_set_curswant = true; redraw_curbuf_later(INVERTED); - } else if (no_reason) - vim_beep(); + } else if (no_reason) { + vim_beep(BO_ESC); + } clearop(cap->oap); /* A CTRL-C is often used at the start of a menu. When 'insertmode' is |