1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar 2018-07-07 16:18:13 +02:00
parent e330ef42f2
commit 1ebff3dc93
2 changed files with 7 additions and 0 deletions

View File

@ -9157,6 +9157,11 @@ do_sleep(long msec)
parse_queued_messages();
#endif
}
// 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

View File

@ -789,6 +789,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
158,
/**/
157,
/**/