diff options
Diffstat (limited to 'src/nvim/os/input.c')
-rw-r--r-- | src/nvim/os/input.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c index 8fc4a5dce5..fc7390a303 100644 --- a/src/nvim/os/input.c +++ b/src/nvim/os/input.c @@ -133,7 +133,7 @@ int os_inchar(uint8_t *buf, int maxlen, int ms, int tb_change_cnt, MultiQueue *e } } else { uint64_t wait_start = os_hrtime(); - assert((int)p_ut >= cursorhold_time); + cursorhold_time = MIN(cursorhold_time, (int)p_ut); if ((result = inbuf_poll((int)p_ut - cursorhold_time, events)) == kInputNone) { if (read_stream.closed && silent_mode) { // Drained eventloop & initial input; exit silent/batch-mode (-es/-Es). @@ -148,7 +148,6 @@ int os_inchar(uint8_t *buf, int maxlen, int ms, int tb_change_cnt, MultiQueue *e } } else { cursorhold_time += (int)((os_hrtime() - wait_start) / 1000000); - cursorhold_time = MIN(cursorhold_time, (int)p_ut); } } |