]> granicus.if.org Git - vim/commitdiff
patch 7.4.1089 v7.4.1089
authorBram Moolenaar <Bram@vim.org>
Tue, 12 Jan 2016 21:20:58 +0000 (22:20 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 12 Jan 2016 21:20:58 +0000 (22:20 +0100)
Problem:    Repeating CTRL-A doesn't work.
Solution:   Call prep_redo_cmd(). (Hirohito Higashi)

src/normal.c
src/testdir/test_increment.vim
src/version.c

index 810aabfa00733ed0cfa6bdb72f01ba9471183f7c..ac1a391f26873c8dbce867b27ea825b252abc93d 100644 (file)
@@ -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;
index e4f67eacadb71f1628afcbe5f6f1b33923b571d2..9b592edce40437512c1ba4f57246bb621b1ff3a7 100644 (file)
@@ -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\<ESC>5\<C-A>."
+  call assert_equal(["20"], getline(1, '$'))
+  call assert_equal([0, 1, 2, 0], getpos('.'))
+endfunc
+
 " vim: tabstop=2 shiftwidth=2 expandtab
index dfcd635106a7936c3d25423ce932d1e511d86cbd..db29e36b55a155ab3cddfa4db4824cd0c3bf203e 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1089,
 /**/
     1088,
 /**/