]> granicus.if.org Git - vim/commitdiff
patch 7.4.863 v7.4.863
authorBram Moolenaar <Bram@vim.org>
Wed, 9 Sep 2015 18:59:37 +0000 (20:59 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 9 Sep 2015 18:59:37 +0000 (20:59 +0200)
Problem:    plines_nofill() used without the diff feature.
Solution:   Define PLINES_NOFILL().

src/macros.h
src/move.c
src/version.c

index 773cffdf77bec8b8e495f8af1e60b53be150bc32..f70e206144c6b4a78f48691f6fd63d9b579f5d5f 100644 (file)
 #  endif
 # endif
 #endif
+
+#ifdef FEAT_DIFF
+# define PLINES_NOFILL(x) plines_nofill(x)
+#else
+# define PLINES_NOFILL(x) plines(x)
+#endif
index 449382fe97bc8e2868927a9b4982b4b2230d4dff..bc6a1207cddc41690365e84cc2fbd2b539214f78 100644 (file)
@@ -1252,11 +1252,7 @@ scrolldown(line_count, byfold)
            }
            else
 #endif
-#ifdef FEAT_DIFF
-               done += plines_nofill(curwin->w_topline);
-#else
-               done += plines(curwin->w_topline);
-#endif
+               done += PLINES_NOFILL(curwin->w_topline);
        }
        --curwin->w_botline;            /* approximate w_botline */
        invalidate_botline();
@@ -1609,13 +1605,7 @@ topline_back(lp)
            lp->height = 1;
        else
 #endif
-       {
-#ifdef FEAT_DIFF
-           lp->height = plines_nofill(lp->lnum);
-#else
-           lp->height = plines(lp->lnum);
-#endif
-       }
+           lp->height = PLINES_NOFILL(lp->lnum);
     }
 }
 
@@ -1653,11 +1643,7 @@ botline_forw(lp)
        else
 #endif
        {
-#ifdef FEAT_DIFF
-           lp->height = plines_nofill(lp->lnum);
-#else
-           lp->height = plines(lp->lnum);
-#endif
+           lp->height = PLINES_NOFILL(lp->lnum);
        }
     }
 }
@@ -1769,7 +1755,7 @@ scroll_cursor_top(min_scroll, always)
            i = 1;
        else
 #endif
-           i = plines_nofill(top);
+           i = PLINES_NOFILL(top);
        used += i;
        if (extra + i <= off && bot < curbuf->b_ml.ml_line_count)
        {
@@ -2273,11 +2259,8 @@ cursor_correct()
                ++above;
            else
 #endif
-#ifndef FEAT_DIFF
-               above += plines(topline);
-#else
-               above += plines_nofill(topline);
-
+               above += PLINES_NOFILL(topline);
+#ifdef FEAT_DIFF
            /* Count filler lines below this line as context. */
            if (topline < botline)
                above += diff_check_fill(curwin, topline + 1);
@@ -2666,11 +2649,7 @@ halfpage(flag, Prenum)
            else
 #endif
            {
-#ifdef FEAT_DIFF
-               i = plines_nofill(curwin->w_topline);
-#else
-               i = plines(curwin->w_topline);
-#endif
+               i = PLINES_NOFILL(curwin->w_topline);
                n -= i;
                if (n < 0 && scrolled > 0)
                    break;
@@ -2776,11 +2755,7 @@ halfpage(flag, Prenum)
            else
 #endif
            {
-#ifdef FEAT_DIFF
-               i = plines_nofill(curwin->w_topline - 1);
-#else
-               i = plines(curwin->w_topline - 1);
-#endif
+               i = PLINES_NOFILL(curwin->w_topline - 1);
                n -= i;
                if (n < 0 && scrolled > 0)
                    break;
index 9044ca22158ed0d0b4f17faadc9474f4b04f2e79..7aff3f239166dd24046a5be3bf70f4639c08e4b7 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    863,
 /**/
     862,
 /**/