mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 22:38:16 +00:00
refactor: allow us to process a child queue only while waiting on input
This commit is contained in:
@@ -9941,9 +9941,7 @@ static void f_getchar(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
if (argvars[0].v_type == VAR_UNKNOWN) {
|
||||
// getchar(): blocking wait.
|
||||
if (!(char_avail() || using_script() || input_available())) {
|
||||
input_enable_events();
|
||||
(void)os_inchar(NULL, 0, -1, 0);
|
||||
input_disable_events();
|
||||
(void)os_inchar(NULL, 0, -1, 0, main_loop.events);
|
||||
if (!multiqueue_empty(main_loop.events)) {
|
||||
multiqueue_process_events(main_loop.events);
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user