]> granicus.if.org Git - vim/commitdiff
patch 7.4.769 v7.4.769
authorBram Moolenaar <Bram@vim.org>
Sat, 4 Jul 2015 13:05:14 +0000 (15:05 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 4 Jul 2015 13:05:14 +0000 (15:05 +0200)
Problem:    Behavior of :diffoff is not tested.
Solution:   Add a bit of testing. (Olaf Dabrunz)

src/testdir/test47.in
src/testdir/test47.ok
src/version.c

index 13ad82462f2b3a4e859890eb20ab09f53844ab59..16d2336812e53a3ce0e253635d51cdfe8de97126 100644 (file)
@@ -1,5 +1,7 @@
 Tests for vertical splits and filler lines in diff mode
 
+Also tests restoration of saved options by :diffoff.
+
 STARTTEST
 :so small.vim
 :" Disable the title to avoid xterm keeping the wrong one.
@@ -10,8 +12,15 @@ pkdd:w! Xtest
 ddGpkkrXoxxx\e:w! Xtest2
 :file Nop
 ggoyyy\ejjjozzzz\e
+:set foldmethod=marker foldcolumn=4
+:redir => nodiffsettings
+:silent! :set diff? fdm? fdc? scb? crb? wrap?
+:redir END
 :vert diffsplit Xtest
 :vert diffsplit Xtest2
+:redir => diffsettings
+:silent! :set diff? fdm? fdc? scb? crb? wrap?
+:redir END
 :" jump to second window for a moment to have filler line appear at start of
 :" first window
 \17\17gg\17pgg:let one = winline()
@@ -36,8 +45,30 @@ j:let three = three . "-" . winline()
 :call append("$", two)
 :call append("$", three)
 :$-2,$w! test.out
-:" Test that diffing shows correct filler lines
+:"
+:" Test diffoff
 :diffoff!
+:$put =nodiffsettings
+:$put =diffsettings
+1\17\17
+:redir => nd1
+:silent! :set diff? fdm? fdc? scb? crb? wrap?
+:redir END
+\17\17
+:redir => nd2
+:silent! :set diff? fdm? fdc? scb? crb? wrap?
+:redir END
+\17\17
+:redir => nd3
+:silent! :set diff? fdm? fdc? scb? crb? wrap?
+:redir END
+\17\17
+:$put =nd1
+:$put =nd2
+:$put =nd3
+:$-39,$w >> test.out
+:"
+:" Test that diffing shows correct filler lines
 :windo :bw!
 :enew
 :put =range(4,10)
@@ -51,7 +82,7 @@ j:let three = three . "-" . winline()
 :enew
 :put =w0
 :.w >> test.out
-:unlet! one two three w0
+:unlet! one two three nodiffsettings diffsettings nd1 nd2 nd3 w0
 :qa!
 ENDTEST
 
index b1cba92b1c799b9fe346cd9689c92241fbe14266..83e96571adc05b44e8cd6d29b8347249d2496a69 100644 (file)
@@ -1,4 +1,44 @@
 2-4-5-6-8-9
 1-2-4-5-8
 2-3-4-5-6-7-8
+
+
+nodiff
+  foldmethod=marker
+  foldcolumn=4
+noscrollbind
+nocursorbind
+  wrap
+
+
+  diff
+  foldmethod=diff
+  foldcolumn=2
+  scrollbind
+  cursorbind
+nowrap
+
+
+nodiff
+  foldmethod=marker
+  foldcolumn=4
+noscrollbind
+nocursorbind
+  wrap
+
+
+nodiff
+  foldmethod=marker
+  foldcolumn=4
+noscrollbind
+nocursorbind
+  wrap
+
+
+nodiff
+  foldmethod=marker
+  foldcolumn=4
+noscrollbind
+nocursorbind
+  wrap
 1
index 047fd1226f4dead951f324ae9fc7dc44d96df31b..cd2604875e0f265d2478658437f69ea51ca45a34 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    769,
 /**/
     768,
 /**/