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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 7c5d39bd70..5f3b143998 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -2861,8 +2861,10 @@ int inchar(uint8_t *buf, int maxlen, long wait_time)
}
// Always flush the output characters when getting input characters
- // from the user.
- ui_flush();
+ // from the user and not just peeking.
+ if (wait_time == -1L || wait_time > 10L) {
+ ui_flush();
+ }
// Fill up to a third of the buffer, because each character may be
// tripled below.