mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 03:28:33 +00:00
state: throttle batched event processing when input is available
before, calling vim.schedule() from inside an event would execute the scheduled callback immediately after this event without checking for user input in between. Break event processing whenever user input or an interrupt is available.
This commit is contained in:
@@ -457,7 +457,7 @@ static int terminal_execute(VimState *state, int key)
|
||||
case K_EVENT:
|
||||
// We cannot let an event free the terminal yet. It is still needed.
|
||||
s->term->refcount++;
|
||||
multiqueue_process_events(main_loop.events);
|
||||
state_handle_k_event();
|
||||
s->term->refcount--;
|
||||
if (s->term->buf_handle == 0) {
|
||||
s->close = true;
|
||||
|
Reference in New Issue
Block a user