diff options
-rw-r--r-- | src/nvim/normal.c | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_increment.vim | 22 | ||||
-rw-r--r-- | src/nvim/version.c | 12 |
3 files changed, 30 insertions, 6 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 9a1d99162f..062461c9f5 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -3043,7 +3043,7 @@ static void prep_redo_visual(cmdarg_T *cap) AppendCharToRedobuff('$'); } else if (curbuf->b_visual.vi_end.col > curbuf->b_visual.vi_start.col) { AppendNumberToRedobuff(curbuf->b_visual.vi_end.col - - curbuf->b_visual.vi_start.col - 1); + curbuf->b_visual.vi_start.col); AppendCharToRedobuff(' '); } } diff --git a/src/nvim/testdir/test_increment.vim b/src/nvim/testdir/test_increment.vim index 277f71d8a4..51cc45f98d 100644 --- a/src/nvim/testdir/test_increment.vim +++ b/src/nvim/testdir/test_increment.vim @@ -556,6 +556,7 @@ func Test_visual_increment_26() exec "norm! \<C-V>$\<C-A>" call assert_equal(["0b11111111111111111111111111111111"], getline(1, '$')) call assert_equal([0, 1, 1, 0], getpos('.')) + set nrformats-=alpha endfunc " 27) increment with 'rightreft', if supported @@ -575,4 +576,25 @@ func Test_visual_increment_27() endif endfunc +" 28) block-wise increment and dot-repeat +" Text: +" 1 23 +" 4 56 +" +" Expected: +" 1) f2 Ctrl-V jl <ctrl-a>, repeat twice afterwards with . +" 1 26 +" 4 59 +" +" Try with and without indent. +func Test_visual_increment_28() + call setline(1, [" 1 23", " 4 56"]) + exec "norm! ggf2\<C-V>jl\<C-A>.." + call assert_equal([" 1 26", " 4 59"], getline(1, 2)) + + call setline(1, ["1 23", "4 56"]) + exec "norm! ggf2\<C-V>jl\<C-A>.." + call assert_equal(["1 26", "4 59"], getline(1, 2)) +endfunc + " vim: tabstop=2 shiftwidth=2 expandtab diff --git a/src/nvim/version.c b/src/nvim/version.c index 0cc6719f63..fbb20ad854 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -73,12 +73,14 @@ static int included_patches[] = { + 1084, + // 1083, + // 1082, 1081, - - - - - + // 1080, + // 1079, + // 1078, + // 1077, 1076, // 1075, // 1074, |