mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 05:28:33 +00:00
refactor: allow us to process a child queue only while waiting on input
This commit is contained in:
@@ -46,14 +46,12 @@ getkey:
|
||||
// Event was made available after the last multiqueue_process_events call
|
||||
key = K_EVENT;
|
||||
} else {
|
||||
input_enable_events();
|
||||
// Flush screen updates before blocking
|
||||
ui_flush();
|
||||
// Call `os_inchar` directly to block for events or user input without
|
||||
// consuming anything from `input_buffer`(os/input.c) or calling the
|
||||
// mapping engine.
|
||||
(void)os_inchar(NULL, 0, -1, 0);
|
||||
input_disable_events();
|
||||
(void)os_inchar(NULL, 0, -1, 0, main_loop.events);
|
||||
// If an event was put into the queue, we send K_EVENT directly.
|
||||
key = !multiqueue_empty(main_loop.events)
|
||||
? K_EVENT
|
||||
|
Reference in New Issue
Block a user