diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-06-04 13:12:57 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-06-04 13:59:43 +0200 |
commit | e50aa2a6c65453067ae3554157fdd31ac8af6168 (patch) | |
tree | 83cd6cf7cd771a3333191e82d94e6f169b0b0997 /src | |
parent | db415bde5f1e366fea09ad572cf37a84894d61d4 (diff) | |
download | rneovim-e50aa2a6c65453067ae3554157fdd31ac8af6168.tar.gz rneovim-e50aa2a6c65453067ae3554157fdd31ac8af6168.tar.bz2 rneovim-e50aa2a6c65453067ae3554157fdd31ac8af6168.zip |
normal: Don't exit CTRL-O mode after processing K_EVENT
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/normal.c | 6 |
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 + } } /* |