diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-06-04 15:23:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-04 15:23:40 +0200 |
commit | 16ee24082f72162d3bdfbddb0b40b5abc2c90fda (patch) | |
tree | cf952d781b666a349ff35213257e23a183209e0b /src | |
parent | 3adb8a10b157bc5c20ab1bdcbaa6f6aa9e36a5fc (diff) | |
parent | e50aa2a6c65453067ae3554157fdd31ac8af6168 (diff) | |
download | rneovim-16ee24082f72162d3bdfbddb0b40b5abc2c90fda.tar.gz rneovim-16ee24082f72162d3bdfbddb0b40b5abc2c90fda.tar.bz2 rneovim-16ee24082f72162d3bdfbddb0b40b5abc2c90fda.zip |
Merge pull request #10117 from bfredl/ctrl-o_event
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 + } } /* |