Skip to content
Permalink
Browse files
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.
  • Loading branch information
brammool committed Jul 7, 2018
1 parent e330ef4 commit 1ebff3dc93b6d022ccfe0613c1d1ee2d62fc7935
Showing with 7 additions and 0 deletions.
  1. +5 −0 src/ex_docmd.c
  2. +2 −0 src/version.c
@@ -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
@@ -789,6 +789,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
158,
/**/
157,
/**/

0 comments on commit 1ebff3d

Please sign in to comment.