Skip to content

Commit 3fc3e14

Browse files
committed
patch 7.4.1259
Problem: No test for what patch 7.3.414 fixed. Solution: Add a test. (Elias Diem)
1 parent a02b321 commit 3fc3e14

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/testdir/test_increment.vim

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,4 +708,23 @@ func Test_visual_increment_38()
708708
call assert_equal([0, 1, 2, 0], getpos('.'))
709709
endfunc
710710

711+
" Test what patch 7.3.414 fixed. Ctrl-A on "000" drops the leading zeros.
712+
func Test_normal_increment_01()
713+
call setline(1, "000")
714+
exec "norm! gg0\<C-A>"
715+
call assert_equal("001", getline(1))
716+
717+
call setline(1, "000")
718+
exec "norm! gg$\<C-A>"
719+
call assert_equal("001", getline(1))
720+
721+
call setline(1, "001")
722+
exec "norm! gg0\<C-A>"
723+
call assert_equal("002", getline(1))
724+
725+
call setline(1, "001")
726+
exec "norm! gg$\<C-A>"
727+
call assert_equal("002", getline(1))
728+
endfunc
729+
711730
" vim: tabstop=2 shiftwidth=2 expandtab

src/version.c

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

743743
static int included_patches[] =
744744
{ /* Add new patch number below this line */
745+
/**/
746+
1259,
745747
/**/
746748
1258,
747749
/**/

0 commit comments

Comments
 (0)