Skip to content

Commit ef2b503

Browse files
committed
patch 7.4.1089
Problem: Repeating CTRL-A doesn't work. Solution: Call prep_redo_cmd(). (Hirohito Higashi)
1 parent 7ae4fbc commit ef2b503

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/normal.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4227,6 +4227,7 @@ nv_addsub(cap)
42274227
{
42284228
if (!VIsual_active && cap->oap->op_type == OP_NOP)
42294229
{
4230+
prep_redo_cmd(cap);
42304231
cap->oap->op_type = cap->cmdchar == Ctrl_A ? OP_NR_ADD : OP_NR_SUB;
42314232
op_addsub(cap->oap, cap->count1, cap->arg);
42324233
cap->oap->op_type = OP_NOP;

src/testdir/test_increment.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,4 +701,11 @@ func Test_visual_increment_37()
701701
call assert_equal(["1 26", "4 59"], getline(1, 2))
702702
endfunc
703703

704+
" Check redo after the normal mode increment
705+
func Test_visual_increment_38()
706+
exec "norm! i10\<ESC>5\<C-A>."
707+
call assert_equal(["20"], getline(1, '$'))
708+
call assert_equal([0, 1, 2, 0], getpos('.'))
709+
endfunc
710+
704711
" vim: tabstop=2 shiftwidth=2 expandtab

src/version.c

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

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
1089,
744746
/**/
745747
1088,
746748
/**/

0 commit comments

Comments
 (0)