0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.4.856

Problem:    "zt" still doesn't work well with filler lines. (Gary Johnson)
Solution:   Check for filler lines above the cursor. (Christian Brabandt)
This commit is contained in:
Bram Moolenaar
2015-09-08 17:31:59 +02:00
parent 7e2ec008f5
commit a09a2c5857
2 changed files with 6 additions and 6 deletions

View File

@@ -1751,12 +1751,10 @@ scroll_cursor_top(min_scroll, always)
new_topline = top + 1; new_topline = top + 1;
#ifdef FEAT_DIFF #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. * again.
* TODO: if filler lines above new top are to be considered as context for * Hide filler lines above cursor line by adding them to "extra". */
* the current window, leave next statement commented, else hide filler extra += diff_check_fill(curwin, curwin->w_cursor.lnum);
* lines above cursor line, by adding them to extra */
/* extra += diff_check_fill(curwin, curwin->w_cursor.lnum); */
#endif #endif
/* /*
@@ -1771,7 +1769,7 @@ scroll_cursor_top(min_scroll, always)
i = 1; i = 1;
else else
#endif #endif
i = plines(top); i = plines_nofill(top);
used += i; used += i;
if (extra + i <= off && bot < curbuf->b_ml.ml_line_count) if (extra + i <= off && bot < curbuf->b_ml.ml_line_count)
{ {

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
856,
/**/ /**/
855, 855,
/**/ /**/