0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 7.4.863

Problem:    plines_nofill() used without the diff feature.
Solution:   Define PLINES_NOFILL().
This commit is contained in:
Bram Moolenaar 2015-09-09 20:59:37 +02:00
parent 5325b9bbae
commit 43335ea394
3 changed files with 16 additions and 33 deletions

View File

@ -315,3 +315,9 @@
# endif # endif
# endif # endif
#endif #endif
#ifdef FEAT_DIFF
# define PLINES_NOFILL(x) plines_nofill(x)
#else
# define PLINES_NOFILL(x) plines(x)
#endif

View File

@ -1252,11 +1252,7 @@ scrolldown(line_count, byfold)
} }
else else
#endif #endif
#ifdef FEAT_DIFF done += PLINES_NOFILL(curwin->w_topline);
done += plines_nofill(curwin->w_topline);
#else
done += plines(curwin->w_topline);
#endif
} }
--curwin->w_botline; /* approximate w_botline */ --curwin->w_botline; /* approximate w_botline */
invalidate_botline(); invalidate_botline();
@ -1609,13 +1605,7 @@ topline_back(lp)
lp->height = 1; lp->height = 1;
else else
#endif #endif
{ lp->height = PLINES_NOFILL(lp->lnum);
#ifdef FEAT_DIFF
lp->height = plines_nofill(lp->lnum);
#else
lp->height = plines(lp->lnum);
#endif
}
} }
} }
@ -1653,11 +1643,7 @@ botline_forw(lp)
else else
#endif #endif
{ {
#ifdef FEAT_DIFF lp->height = PLINES_NOFILL(lp->lnum);
lp->height = plines_nofill(lp->lnum);
#else
lp->height = plines(lp->lnum);
#endif
} }
} }
} }
@ -1769,7 +1755,7 @@ scroll_cursor_top(min_scroll, always)
i = 1; i = 1;
else else
#endif #endif
i = plines_nofill(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)
{ {
@ -2273,11 +2259,8 @@ cursor_correct()
++above; ++above;
else else
#endif #endif
#ifndef FEAT_DIFF above += PLINES_NOFILL(topline);
above += plines(topline); #ifdef FEAT_DIFF
#else
above += plines_nofill(topline);
/* Count filler lines below this line as context. */ /* Count filler lines below this line as context. */
if (topline < botline) if (topline < botline)
above += diff_check_fill(curwin, topline + 1); above += diff_check_fill(curwin, topline + 1);
@ -2666,11 +2649,7 @@ halfpage(flag, Prenum)
else else
#endif #endif
{ {
#ifdef FEAT_DIFF i = PLINES_NOFILL(curwin->w_topline);
i = plines_nofill(curwin->w_topline);
#else
i = plines(curwin->w_topline);
#endif
n -= i; n -= i;
if (n < 0 && scrolled > 0) if (n < 0 && scrolled > 0)
break; break;
@ -2776,11 +2755,7 @@ halfpage(flag, Prenum)
else else
#endif #endif
{ {
#ifdef FEAT_DIFF i = PLINES_NOFILL(curwin->w_topline - 1);
i = plines_nofill(curwin->w_topline - 1);
#else
i = plines(curwin->w_topline - 1);
#endif
n -= i; n -= i;
if (n < 0 && scrolled > 0) if (n < 0 && scrolled > 0)
break; break;

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 */
/**/
863,
/**/ /**/
862, 862,
/**/ /**/