summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-09-08 17:31:59 +0200
committerBram Moolenaar <Bram@vim.org>2015-09-08 17:31:59 +0200
commita09a2c5857ab854f0870573b5160da1964c905a2 (patch)
treeef92eafb42b13680ed628fe948c7e59571a3cea7
parent7e2ec008f5c5152205d0b8a7d88177b374225d8d (diff)
downloadvim-git-a09a2c5857ab854f0870573b5160da1964c905a2.tar.gz
patch 7.4.856v7.4.856
Problem: "zt" still doesn't work well with filler lines. (Gary Johnson) Solution: Check for filler lines above the cursor. (Christian Brabandt)
-rw-r--r--src/move.c10
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/move.c b/src/move.c
index 594f9acf5..449382fe9 100644
--- a/src/move.c
+++ b/src/move.c
@@ -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)
{
diff --git a/src/version.c b/src/version.c
index 7733d4b5e..a3b567ef8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 856,
+/**/
855,
/**/
854,