diff src/testdir/test_diffmode.vim @ 14972:5d52b21b2e7f v8.1.0497

patch 8.1.0497: :%diffput changes order of lines commit https://github.com/vim/vim/commit/5f57bdcab77bc417ae0357fe8ad6c7259b6d25df Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 25 17:52:23 2018 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 25 Oct 2018 18:00:07 +0200
parents 291656f731c9
children 28fde4aa8534
line wrap: on
line diff
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -221,6 +221,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('%')