mirror of
https://github.com/neovim/neovim.git
synced 2025-11-25 11:40:40 +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:
@@ -601,11 +601,11 @@ edit (
|
||||
* Get a character for Insert mode. Ignore K_IGNORE.
|
||||
*/
|
||||
lastc = c; /* remember previous char for CTRL-D */
|
||||
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) {
|
||||
c = lastc;
|
||||
|
||||
Reference in New Issue
Block a user