]> granicus.if.org Git - vim/commitdiff
patch 7.4.1634 v7.4.1634
authorBram Moolenaar <Bram@vim.org>
Mon, 21 Mar 2016 22:13:32 +0000 (23:13 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 21 Mar 2016 22:13:32 +0000 (23:13 +0100)
Problem:    Vertical movement after CTRL-A ends up in the wrong column.
            (Urtica Dioica)
Solution:   Set curswant when appropriate. (Hirohito Higashi)

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

index fa159e983ccb6b9c37bf55fa3efcc0ed77738bee..b1910d95d06395ef79163927605937bd4147c86d 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -5783,6 +5783,8 @@ do_addsub(
 theend:
     if (visual)
        curwin->w_cursor = save_cursor;
+    else if (did_change)
+       curwin->w_set_curswant = TRUE;
 
     return did_change;
 }
index 275969e15f58f5f3c97ae45450d66425c6d7cc07..a6578cf0c7191db4278a929a3587501c038fa804 100644 (file)
@@ -727,4 +727,13 @@ func Test_normal_increment_01()
   call assert_equal("002", getline(1))
 endfunc
 
+" Test a regression of patch 7.4.1087 fixed.
+func Test_normal_increment_02()
+  call setline(1, ["hello 10", "world"])
+  exec "norm! ggl\<C-A>jx"
+  call assert_equal(["hello 11", "worl"], getline(1, '$'))
+  call assert_equal([0, 2, 4, 0], getpos('.'))
+endfunc
+
+
 " vim: tabstop=2 shiftwidth=2 expandtab
index 3f45bd64b5b986a0f09ff9745e5c5279a16a76e8..af13a75e52665b7c764a694b10cc9cee9c3d4bbc 100644 (file)
@@ -748,6 +748,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1634,
 /**/
     1633,
 /**/