mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 23:31:51 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user