mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 03:28:33 +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:
@@ -69,6 +69,7 @@
|
||||
#include "nvim/fileio.h"
|
||||
#include "nvim/event/loop.h"
|
||||
#include "nvim/event/time.h"
|
||||
#include "nvim/os/input.h"
|
||||
#include "nvim/api/private/helpers.h"
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
@@ -354,13 +355,13 @@ void terminal_enter(bool process_deferred)
|
||||
|
||||
while (term->buf == curbuf) {
|
||||
if (process_deferred) {
|
||||
loop_enable_deferred_events(&loop);
|
||||
input_enable_events();
|
||||
}
|
||||
|
||||
c = safe_vgetc();
|
||||
|
||||
if (process_deferred) {
|
||||
loop_disable_deferred_events(&loop);
|
||||
input_disable_events();
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
|
Reference in New Issue
Block a user