aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-12-10 17:11:45 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2021-12-10 17:11:45 +0100
commitc88555418a991407a46b74dc038a0b08ad0f0162 (patch)
tree645af91db15de07484494a7d789523a269b328c2 /src/nvim/getchar.c
parent6dbd4f3787f7d6ddc27102a8d419f044c936560c (diff)
downloadrneovim-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.c9
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.