mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
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:

committed by
Justin M. Keyes

parent
bb24fec333
commit
78df9eb51d
@@ -7415,6 +7415,12 @@ void do_sleep(long msec)
|
|||||||
LOOP_PROCESS_EVENTS_UNTIL(&main_loop, main_loop.events, (int)next, got_int);
|
LOOP_PROCESS_EVENTS_UNTIL(&main_loop, main_loop.events, (int)next, got_int);
|
||||||
os_breakcheck();
|
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)
|
static void do_exmap(exarg_T *eap, int isabbrev)
|
||||||
|
Reference in New Issue
Block a user