0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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)
This commit is contained in:
Bram Moolenaar
2016-03-21 23:13:32 +01:00
parent b763eba7ae
commit 8e08125d3a
3 changed files with 13 additions and 0 deletions

View File

@@ -5783,6 +5783,8 @@ do_addsub(
theend: theend:
if (visual) if (visual)
curwin->w_cursor = save_cursor; curwin->w_cursor = save_cursor;
else if (did_change)
curwin->w_set_curswant = TRUE;
return did_change; return did_change;
} }

View File

@@ -727,4 +727,13 @@ func Test_normal_increment_01()
call assert_equal("002", getline(1)) call assert_equal("002", getline(1))
endfunc 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 " vim: tabstop=2 shiftwidth=2 expandtab

View File

@@ -748,6 +748,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1634,
/**/ /**/
1633, 1633,
/**/ /**/