summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/edit.c1
-rw-r--r--src/testdir/test_selectmode.vim11
-rw-r--r--src/version.c2
3 files changed, 14 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c
index 0c902f895f..a515425253 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -3859,6 +3859,7 @@ ins_insert(int replaceState)
static void
ins_ctrl_o(void)
{
+ restart_VIsual_select = 0;
if (State & VREPLACE_FLAG)
restart_edit = 'V';
else if (State & REPLACE_FLAG)
diff --git a/src/testdir/test_selectmode.vim b/src/testdir/test_selectmode.vim
index 6e2c36927c..bf1b52b325 100644
--- a/src/testdir/test_selectmode.vim
+++ b/src/testdir/test_selectmode.vim
@@ -310,4 +310,15 @@ func Test_selectmode_register()
bw!
endfunc
+func Test_ins_ctrl_o_in_insert_mode_resets_selectmode()
+ new
+ " ctrl-o in insert mode resets restart_VIsual_select
+ call setline(1, 'abcdef')
+ call cursor(1, 1)
+ exe "norm! \<c-v>\<c-g>\<c-o>c\<c-o>\<c-v>\<right>\<right>IABC"
+ call assert_equal('ABCbcdef', getline(1))
+
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/version.c b/src/version.c
index 605a61c4f6..61fe83b785 100644
--- a/src/version.c
+++ b/src/version.c
@@ -700,6 +700,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1852,
+/**/
1851,
/**/
1850,