Problem: i_CTRL-O does not reset Select Mode
Solution: Reset select mode on CTRL-O in insert mode
closes: #13001
closes: #12115
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Christian Brabandt <cb@256bit.org>
static void
ins_ctrl_o(void)
{
+ restart_VIsual_select = 0;
if (State & VREPLACE_FLAG)
restart_edit = 'V';
else if (State & REPLACE_FLAG)
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
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1852,
/**/
1851,
/**/