diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-12-10 17:11:45 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2021-12-10 17:11:45 +0100 |
commit | c88555418a991407a46b74dc038a0b08ad0f0162 (patch) | |
tree | 645af91db15de07484494a7d789523a269b328c2 /src/nvim/getchar.c | |
parent | 6dbd4f3787f7d6ddc27102a8d419f044c936560c (diff) | |
download | rneovim-c88555418a991407a46b74dc038a0b08ad0f0162.tar.gz rneovim-c88555418a991407a46b74dc038a0b08ad0f0162.tar.bz2 rneovim-c88555418a991407a46b74dc038a0b08ad0f0162.zip |
refactor(misc1): move way beep functions elsewhere
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 27e8cb36af..3385c12fac 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -458,6 +458,15 @@ void flush_buffers(flush_buffers_T flush_typeahead) } } +/// flush map and typeahead buffers and give a warning for an error +void beep_flush(void) +{ + if (emsg_silent == 0) { + flush_buffers(FLUSH_MINIMAL); + vim_beep(BO_ERROR); + } +} + /* * The previous contents of the redo buffer is kept in old_redobuffer. * This is used for the CTRL-O <.> command in insert mode. |