mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 10:31:48 +00:00
event: No longer process K_EVENT automatically
Two new functions, `event_enable_deferred()`/`event_disable_deferred()` have to be called by code that is capable of handling asynchronicity. User-dialog states like "press ENTER to continue" or the swap file confirmation no longer will generate K_EVENT.
This commit is contained in:
@@ -44,7 +44,6 @@
|
||||
#include "nvim/term.h"
|
||||
#include "nvim/ui.h"
|
||||
#include "nvim/os/os.h"
|
||||
#include "nvim/os/event.h"
|
||||
|
||||
/*
|
||||
* To be able to scroll back at the "more" and "hit-enter" prompts we need to
|
||||
@@ -2076,9 +2075,6 @@ static int do_more_prompt(int typed_char)
|
||||
|
||||
toscroll = 0;
|
||||
switch (c) {
|
||||
case K_EVENT:
|
||||
event_process();
|
||||
break;
|
||||
case BS: /* scroll one line back */
|
||||
case K_BS:
|
||||
case 'k':
|
||||
@@ -2738,8 +2734,6 @@ do_dialog (
|
||||
break;
|
||||
default: /* Could be a hotkey? */
|
||||
if (c < 0) { /* special keys are ignored here */
|
||||
// drain event queue to prevent infinite loop
|
||||
event_process();
|
||||
continue;
|
||||
}
|
||||
if (c == ':' && ex_cmd) {
|
||||
|
||||
Reference in New Issue
Block a user