vim-patch:1ebff3dc9 #10144

patch 8.1.0158: GUI: input() fails if CTRL-C was pressed before

Problem:    GUI: input() fails if CTRL-C was pressed before. (Michael Naumann)
Solution:   call vpeekc() to drop the CTRL-C from the input stream.
1ebff3dc93
This commit is contained in:
Daniel Hahler
2019-06-08 13:02:26 +02:00
committed by Justin M. Keyes
parent bb24fec333
commit 78df9eb51d

View File

@@ -7415,6 +7415,12 @@ void do_sleep(long msec)
LOOP_PROCESS_EVENTS_UNTIL(&main_loop, main_loop.events, (int)next, got_int);
os_breakcheck();
}
// If CTRL-C was typed to interrupt the sleep, drop the CTRL-C from the
// input buffer, otherwise a following call to input() fails.
if (got_int) {
(void)vpeekc();
}
}
static void do_exmap(exarg_T *eap, int isabbrev)