aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-12-10 23:38:00 +0100
committerGitHub <noreply@github.com>2021-12-10 23:38:00 +0100
commit3f8703093de56254ffdbf8ef6ddbe7942af54257 (patch)
tree3261cb4da5542e767c386129f436c21bdcf78be6 /src/nvim/getchar.c
parent53c95ccd1bb63c89afca18f86d38aba26f5ec90d (diff)
parentdf54d82b7c98ae5b1608c56e0dc216d77ebb3101 (diff)
downloadrneovim-3f8703093de56254ffdbf8ef6ddbe7942af54257.tar.gz
rneovim-3f8703093de56254ffdbf8ef6ddbe7942af54257.tar.bz2
rneovim-3f8703093de56254ffdbf8ef6ddbe7942af54257.zip
Merge pull request #16607 from bfredl/no2misc1
refactor: get rid of misc1.c ("functions that didn't seem to fit elsewhere")
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 27e8cb36af..05c38a5233 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -29,6 +29,7 @@
#include "nvim/func_attr.h"
#include "nvim/garray.h"
#include "nvim/getchar.h"
+#include "nvim/input.h"
#include "nvim/keymap.h"
#include "nvim/lua/executor.h"
#include "nvim/main.h"
@@ -36,7 +37,6 @@
#include "nvim/memline.h"
#include "nvim/memory.h"
#include "nvim/message.h"
-#include "nvim/misc1.h"
#include "nvim/move.h"
#include "nvim/normal.h"
#include "nvim/ops.h"
@@ -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.