Skip to content

Commit 8e08125

Browse files
committed
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)
1 parent b763eba commit 8e08125

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

src/ops.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5783,6 +5783,8 @@ do_addsub(
57835783
theend:
57845784
if (visual)
57855785
curwin->w_cursor = save_cursor;
5786+
else if (did_change)
5787+
curwin->w_set_curswant = TRUE;
57865788

57875789
return did_change;
57885790
}

src/testdir/test_increment.vim

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,4 +727,13 @@ func Test_normal_increment_01()
727727
call assert_equal("002", getline(1))
728728
endfunc
729729

730+
" Test a regression of patch 7.4.1087 fixed.
731+
func Test_normal_increment_02()
732+
call setline(1, ["hello 10", "world"])
733+
exec "norm! ggl\<C-A>jx"
734+
call assert_equal(["hello 11", "worl"], getline(1, '$'))
735+
call assert_equal([0, 2, 4, 0], getpos('.'))
736+
endfunc
737+
738+
730739
" vim: tabstop=2 shiftwidth=2 expandtab

src/version.c

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

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1634,
751753
/**/
752754
1633,
753755
/**/

0 commit comments

Comments
 (0)