Skip to content

Commit 0b5c93a

Browse files
committed
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)
1 parent 1266d67 commit 0b5c93a

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/normal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,6 +2041,8 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
20412041

20422042
if (restart_edit == 0)
20432043
restart_edit = restart_edit_save;
2044+
else
2045+
cap->retval |= CA_COMMAND_BUSY;
20442046
}
20452047
#else
20462048
vim_beep(BO_OPER);

src/ops.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2571,7 +2571,8 @@ op_insert(oparg_T *oap, long count1)
25712571
}
25722572

25732573
t1 = oap->start;
2574-
edit(NUL, FALSE, (linenr_T)count1);
2574+
if (edit(NUL, FALSE, (linenr_T)count1))
2575+
return;
25752576

25762577
/* When a tab was inserted, and the characters in front of the tab
25772578
* have been converted to a tab as well, the column of the cursor

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
282,
767769
/**/
768770
281,
769771
/**/

0 commit comments

Comments
 (0)