aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 437495faa4..74e5526caa 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -1562,6 +1562,11 @@ int char_avail(void)
{
int retval;
+ // When disable_char_avail_for_testing(1) was called pretend
+ // there is no typeahead
+ if (disable_char_avail_for_testing) {
+ return FALSE;
+ }
++no_mapping;
retval = vpeekc();
--no_mapping;