changeset 8690:6a1becf4f282 v7.4.1634

commit https://github.com/vim/vim/commit/8e08125d3a9afd0b16cd84454ae9ddad0abaaab0 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 21 23:13:32 2016 +0100 patch 7.4.1634 Problem: Vertical movement after CTRL-A ends up in the wrong column. (Urtica Dioica) Solution: Set curswant when appropriate. (Hirohito Higashi)
author Christian Brabandt <cb@256bit.org>
date Mon, 21 Mar 2016 23:15:04 +0100
parents 63d1d06fb303
children 10294afbbce0
files src/ops.c src/testdir/test_increment.vim src/version.c
diffstat 3 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }
--- a/src/testdir/test_increment.vim
+++ b/src/testdir/test_increment.vim
@@ -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
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1634,
+/**/
     1633,
 /**/
     1632,