# HG changeset patch # User Christian Brabandt # Date 1485958504 -3600 # Node ID 9938c90d1e6c7db5f7bb0a786d9d3817692d0b48 # Parent 422ba6de412fd79fb84b3c95e246d85cc85d0df2 patch 8.0.0282: need to use CTRL-O twice when in Visual-Insert mode commit https://github.com/vim/vim/commit/0b5c93a7f266cd8c90ea27bdaf9f7214a95d64d7 Author: Bram Moolenaar Date: Wed Feb 1 15:03:30 2017 +0100 patch 8.0.0282: need to use CTRL-O twice when in Visual-Insert mode Problem: When doing a Visual selection and using "I" to go to insert mode, CTRL-O needs to be used twice to go to Normal mode. (Coacher) Solution: Check for the return value of edit(). (Christian Brabandt, closes #1290) diff --git a/src/normal.c b/src/normal.c --- a/src/normal.c +++ b/src/normal.c @@ -2041,6 +2041,8 @@ do_pending_operator(cmdarg_T *cap, int o if (restart_edit == 0) restart_edit = restart_edit_save; + else + cap->retval |= CA_COMMAND_BUSY; } #else vim_beep(BO_OPER); diff --git a/src/ops.c b/src/ops.c --- a/src/ops.c +++ b/src/ops.c @@ -2571,7 +2571,8 @@ op_insert(oparg_T *oap, long count1) } t1 = oap->start; - edit(NUL, FALSE, (linenr_T)count1); + if (edit(NUL, FALSE, (linenr_T)count1)) + return; /* When a tab was inserted, and the characters in front of the tab * have been converted to a tab as well, the column of the cursor diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 282, +/**/ 281, /**/ 280,