mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.1852: i_CTRL-O does not reset Select Mode
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>
This commit is contained in:
parent
3c3cf1d689
commit
d69aecf141
@ -3859,6 +3859,7 @@ ins_insert(int replaceState)
|
|||||||
static void
|
static void
|
||||||
ins_ctrl_o(void)
|
ins_ctrl_o(void)
|
||||||
{
|
{
|
||||||
|
restart_VIsual_select = 0;
|
||||||
if (State & VREPLACE_FLAG)
|
if (State & VREPLACE_FLAG)
|
||||||
restart_edit = 'V';
|
restart_edit = 'V';
|
||||||
else if (State & REPLACE_FLAG)
|
else if (State & REPLACE_FLAG)
|
||||||
|
@ -310,4 +310,15 @@ func Test_selectmode_register()
|
|||||||
bw!
|
bw!
|
||||||
endfunc
|
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
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@ -699,6 +699,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1852,
|
||||||
/**/
|
/**/
|
||||||
1851,
|
1851,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user