diff options
| author | watiko <service@mail.watiko.net> | 2016-01-15 18:07:45 +0900 |
|---|---|---|
| committer | watiko <service@mail.watiko.net> | 2016-02-01 03:47:09 +0900 |
| commit | 2f52ae18e75a85af78b78587d5b44b6d8d4814b7 (patch) | |
| tree | 7b5b40edbfb438337cd3b3008a2fa0fa32027a79 /src/nvim/testdir | |
| parent | 594e3a64de2f2a0aac2dfdebbf5881ee3403c275 (diff) | |
| download | rneovim-2f52ae18e75a85af78b78587d5b44b6d8d4814b7.tar.gz rneovim-2f52ae18e75a85af78b78587d5b44b6d8d4814b7.tar.bz2 rneovim-2f52ae18e75a85af78b78587d5b44b6d8d4814b7.zip | |
vim-patch:7.4.1084
Problem: Using "." to repeat CTRL-A in Visual mode increments the wrong
numbers.
Solution: Append right size to the redo buffer. (Ozaki Kiichi)
https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_increment.vim | 22 |
1 files changed, 22 insertions, 0 deletions
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 |