diff options
author | Anatolii Sakhnik <sakhnik@gmail.com> | 2018-12-09 20:05:53 +0200 |
---|---|---|
committer | Anatolii Sakhnik <sakhnik@gmail.com> | 2018-12-09 20:05:53 +0200 |
commit | 8f20c22e10c35075afd97bf6af50fb6d9a2dc710 (patch) | |
tree | 536a00582583dfa77cb4ac90fbdb8761dbe951fe /src/nvim/testdir/test_diffmode.vim | |
parent | e104228b1c89022f0b284753ff92deb2e9374c5b (diff) | |
download | rneovim-8f20c22e10c35075afd97bf6af50fb6d9a2dc710.tar.gz rneovim-8f20c22e10c35075afd97bf6af50fb6d9a2dc710.tar.bz2 rneovim-8f20c22e10c35075afd97bf6af50fb6d9a2dc710.zip |
vim-patch:8.1.0497: :%diffput changes order of lines
Problem: :%diffput changes order of lines. (Markus Braun)
Solution: Do adjust marks when using internal diff.
https://github.com/vim/vim/commit/5f57bdcab77bc417ae0357fe8ad6c7259b6d25df
Diffstat (limited to 'src/nvim/testdir/test_diffmode.vim')
-rw-r--r-- | src/nvim/testdir/test_diffmode.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim index f34c2fd26d..ad3eec3274 100644 --- a/src/nvim/testdir/test_diffmode.vim +++ b/src/nvim/testdir/test_diffmode.vim @@ -219,6 +219,26 @@ func Test_diffget_diffput() %bwipe! endfunc +" Test putting two changes from one buffer to another +func Test_diffput_two() + new a + let win_a = win_getid() + call setline(1, range(1, 10)) + diffthis + new b + let win_b = win_getid() + call setline(1, range(1, 10)) + 8del + 5del + diffthis + call win_gotoid(win_a) + %diffput + call win_gotoid(win_b) + call assert_equal(map(range(1, 10), 'string(v:val)'), getline(1, '$')) + bwipe! a + bwipe! b +endfunc + func Test_dp_do_buffer() e! one let bn1=bufnr('%') |