]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.3.708 v7.3.708
authorBram Moolenaar <Bram@vim.org>
Sun, 21 Oct 2012 20:18:21 +0000 (22:18 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 21 Oct 2012 20:18:21 +0000 (22:18 +0200)
Problem:    Filler lines above the first line may be hidden when opening Vim.
Solution:   Change how topfill is computed. (Christian Brabandt)

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

index d9aaec828726d7899006b862b4f4e3bf898b3d52..864e60914395b354cdbfac2bd3ba498f5c607650 100644 (file)
@@ -615,11 +615,13 @@ diff_redraw(dofold)
 #endif
            /* A change may have made filler lines invalid, need to take care
             * of that for other windows. */
-           if (wp != curwin && wp->w_topfill > 0)
+           n = diff_check(wp, wp->w_topline);
+           if ((wp != curwin && wp->w_topfill > 0) || n > 0)
            {
-               n = diff_check(wp, wp->w_topline);
                if (wp->w_topfill > n)
                    wp->w_topfill = (n < 0 ? 0 : n);
+               else if (n > 0 && n > wp->w_topfill)
+                   wp->w_topfill = n;
            }
        }
 }
index c87387b2fd5b65b63cf8b32a45a211dbc867f743..13ad82462f2b3a4e859890eb20ab09f53844ab59 100644 (file)
@@ -36,7 +36,22 @@ j:let three = three . "-" . winline()
 :call append("$", two)
 :call append("$", three)
 :$-2,$w! test.out
-:unlet one two three
+:" Test that diffing shows correct filler lines
+:diffoff!
+:windo :bw!
+:enew
+:put =range(4,10)
+:1d _
+:vnew
+:put =range(1,10)
+:1d _
+:windo :diffthis
+:wincmd h
+:let w0=line('w0')
+:enew
+:put =w0
+:.w >> test.out
+:unlet! one two three w0
 :qa!
 ENDTEST
 
index 3307b934ebd0db7281729173c49823ec49559986..b1cba92b1c799b9fe346cd9689c92241fbe14266 100644 (file)
@@ -1,3 +1,4 @@
 2-4-5-6-8-9
 1-2-4-5-8
 2-3-4-5-6-7-8
+1
index 4631c72045e0df09b29e38b179f7bf0d8b8b170a..ddd3934229365413b444efd2422c814235a8274a 100644 (file)
@@ -725,6 +725,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    708,
 /**/
     707,
 /**/