]> granicus.if.org Git - vim/commitdiff
patch 7.4.856 v7.4.856
authorBram Moolenaar <Bram@vim.org>
Tue, 8 Sep 2015 15:31:59 +0000 (17:31 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 8 Sep 2015 15:31:59 +0000 (17:31 +0200)
Problem:    "zt" still doesn't work well with filler lines. (Gary Johnson)
Solution:   Check for filler lines above the cursor. (Christian Brabandt)

src/move.c
src/version.c

index 594f9acf57cf7931860f24411b3a88c31cd7278a..449382fe97bc8e2868927a9b4982b4b2230d4dff 100644 (file)
@@ -1751,12 +1751,10 @@ scroll_cursor_top(min_scroll, always)
     new_topline = top + 1;
 
 #ifdef FEAT_DIFF
-    /* used already contains the number of filler lines above, don't add it
+    /* "used" already contains the number of filler lines above, don't add it
      * again.
-     * TODO: if filler lines above new top are to be considered as context for
-     * the current window, leave next statement commented, else hide filler
-     * lines above cursor line, by adding them to extra */
-    /* extra += diff_check_fill(curwin, curwin->w_cursor.lnum); */
+     * Hide filler lines above cursor line by adding them to "extra". */
+    extra += diff_check_fill(curwin, curwin->w_cursor.lnum);
 #endif
 
     /*
@@ -1771,7 +1769,7 @@ scroll_cursor_top(min_scroll, always)
            i = 1;
        else
 #endif
-           i = plines(top);
+           i = plines_nofill(top);
        used += i;
        if (extra + i <= off && bot < curbuf->b_ml.ml_line_count)
        {
index 7733d4b5e2618b0decbce5b8532e4810fe97cbb5..a3b567ef83a6eab03fec61553418eed49f9aa3ce 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    856,
 /**/
     855,
 /**/