diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-08-31 23:20:30 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-09-05 15:01:06 +0200 |
commit | 46fdacc5b5abb05d49c0f16fe5ffc4ceb7795dee (patch) | |
tree | 75e8f8c48e1b379b3a68a283aacaa66ece5abef0 /src/nvim/state.c | |
parent | b6b6e4a96f37ba6a54d194ecbc042d5ef7d595e6 (diff) | |
download | rneovim-46fdacc5b5abb05d49c0f16fe5ffc4ceb7795dee.tar.gz rneovim-46fdacc5b5abb05d49c0f16fe5ffc4ceb7795dee.tar.bz2 rneovim-46fdacc5b5abb05d49c0f16fe5ffc4ceb7795dee.zip |
doc: eventloop
Diffstat (limited to 'src/nvim/state.c')
-rw-r--r-- | src/nvim/state.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/state.c b/src/nvim/state.c index 24248ec66c..4d9032b7a5 100644 --- a/src/nvim/state.c +++ b/src/nvim/state.c @@ -49,11 +49,13 @@ getkey: 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. If an event was put into the queue, we send K_EVENT - // directly. + // mapping engine. (void)os_inchar(NULL, 0, -1, 0); input_disable_events(); - key = !multiqueue_empty(main_loop.events) ? K_EVENT : safe_vgetc(); + // If an event was put into the queue, we send K_EVENT directly. + key = !multiqueue_empty(main_loop.events) + ? K_EVENT + : safe_vgetc(); } if (key == K_EVENT) { |