summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-10-25 17:52:23 +0200
committerBram Moolenaar <Bram@vim.org>2018-10-25 17:52:23 +0200
commit5f57bdcab77bc417ae0357fe8ad6c7259b6d25df (patch)
treef05f00dee1abb6472935bddc2adcfd74a3ec14ed /src/testdir/test_diffmode.vim
parentc0fe4978f2311be9a0221d4c2369251c719b399a (diff)
patch 8.1.0497: :%diffput changes order of linesv8.1.0497
Problem: :%diffput changes order of lines. (Markus Braun) Solution: Do adjust marks when using internal diff.
Diffstat (limited to 'src/testdir/test_diffmode.vim')
-rw-r--r--src/testdir/test_diffmode.vim20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
index e1da19fefe..6a8bea0ec5 100644
--- 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('%')