aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/normal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index db2da6a807..7e295d9ca3 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -7983,8 +7983,14 @@ static void nv_event(cmdarg_T *cap)
// not safe to perform garbage collection because there could be unreferenced
// lists or dicts being used.
may_garbage_collect = false;
+ bool may_restart = (restart_edit != 0);
multiqueue_process_events(main_loop.events);
finish_op = false;
+ if (may_restart) {
+ // Tricky: if restart_edit was set before the handler we are in ctrl-o mode
+ // but if not, the event should be allow to trigger :startinsert
+ cap->retval |= CA_COMMAND_BUSY; // don't call edit() now
+ }
}
/*