diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-07-24 10:38:35 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-08-13 07:41:04 -0300 |
commit | 3f5af6c1c4815c5fb2a492292212b244abe23759 (patch) | |
tree | 617a8b2348ad58b4c2e67c9de30349f789e9f223 /src/nvim/ex_getln.c | |
parent | ccdeb91e1206f38773664979bf03694213a2ba80 (diff) | |
download | rneovim-3f5af6c1c4815c5fb2a492292212b244abe23759.tar.gz rneovim-3f5af6c1c4815c5fb2a492292212b244abe23759.tar.bz2 rneovim-3f5af6c1c4815c5fb2a492292212b244abe23759.zip |
loop: Simplify loop.c and move some code to input.c
- Declare poll timer in Loop structure instead of a loop_poll_events local
variable.
- Move deferred event management to input.c
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 785db1dbd1..f32aee809a 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -62,6 +62,7 @@ #include "nvim/tag.h" #include "nvim/window.h" #include "nvim/ui.h" +#include "nvim/os/input.h" #include "nvim/os/os.h" #include "nvim/event/loop.h" @@ -298,11 +299,11 @@ getcmdline ( /* Get a character. Ignore K_IGNORE, it should not do anything, such * as stop completion. */ - loop_enable_deferred_events(&loop); + input_enable_events(); do { c = safe_vgetc(); } while (c == K_IGNORE); - loop_disable_deferred_events(&loop); + input_disable_events(); if (c == K_EVENT) { loop_process_event(&loop); |