From ef2b5036b3005f1ce15d146dce72379a9834c56d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 12 Jan 2016 22:20:58 +0100 Subject: patch 7.4.1089 Problem: Repeating CTRL-A doesn't work. Solution: Call prep_redo_cmd(). (Hirohito Higashi) --- src/normal.c | 1 + src/testdir/test_increment.vim | 7 +++++++ src/version.c | 2 ++ 3 files changed, 10 insertions(+) (limited to 'src') diff --git a/src/normal.c b/src/normal.c index 810aabfa0..ac1a391f2 100644 --- a/src/normal.c +++ b/src/normal.c @@ -4227,6 +4227,7 @@ nv_addsub(cap) { if (!VIsual_active && cap->oap->op_type == OP_NOP) { + prep_redo_cmd(cap); cap->oap->op_type = cap->cmdchar == Ctrl_A ? OP_NR_ADD : OP_NR_SUB; op_addsub(cap->oap, cap->count1, cap->arg); cap->oap->op_type = OP_NOP; diff --git a/src/testdir/test_increment.vim b/src/testdir/test_increment.vim index e4f67eaca..9b592edce 100644 --- a/src/testdir/test_increment.vim +++ b/src/testdir/test_increment.vim @@ -701,4 +701,11 @@ func Test_visual_increment_37() call assert_equal(["1 26", "4 59"], getline(1, 2)) endfunc +" Check redo after the normal mode increment +func Test_visual_increment_38() + exec "norm! i10\5\." + call assert_equal(["20"], getline(1, '$')) + call assert_equal([0, 1, 2, 0], getpos('.')) +endfunc + " vim: tabstop=2 shiftwidth=2 expandtab diff --git a/src/version.c b/src/version.c index dfcd63510..db29e36b5 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1089, /**/ 1088, /**/ -- cgit v1.2.1