Karsten Hopp ac08c1
To: vim_dev@googlegroups.com
Karsten Hopp ac08c1
Subject: Patch 7.4.863
Karsten Hopp ac08c1
Fcc: outbox
Karsten Hopp ac08c1
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp ac08c1
Mime-Version: 1.0
Karsten Hopp ac08c1
Content-Type: text/plain; charset=UTF-8
Karsten Hopp ac08c1
Content-Transfer-Encoding: 8bit
Karsten Hopp ac08c1
------------
Karsten Hopp ac08c1
Karsten Hopp ac08c1
Patch 7.4.863
Karsten Hopp ac08c1
Problem:    plines_nofill() used without the diff feature.
Karsten Hopp ac08c1
Solution:   Define PLINES_NOFILL().
Karsten Hopp ac08c1
Files:      src/macros.h, src/move.c
Karsten Hopp ac08c1
Karsten Hopp ac08c1
Karsten Hopp ac08c1
*** ../vim-7.4.862/src/macros.h	2015-07-10 17:56:18.219777154 +0200
Karsten Hopp ac08c1
--- src/macros.h	2015-09-09 20:14:30.153091468 +0200
Karsten Hopp ac08c1
***************
Karsten Hopp ac08c1
*** 315,317 ****
Karsten Hopp ac08c1
--- 315,323 ----
Karsten Hopp ac08c1
  #  endif
Karsten Hopp ac08c1
  # endif
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
+ 
Karsten Hopp ac08c1
+ #ifdef FEAT_DIFF
Karsten Hopp ac08c1
+ # define PLINES_NOFILL(x) plines_nofill(x)
Karsten Hopp ac08c1
+ #else
Karsten Hopp ac08c1
+ # define PLINES_NOFILL(x) plines(x)
Karsten Hopp ac08c1
+ #endif
Karsten Hopp ac08c1
*** ../vim-7.4.862/src/move.c	2015-09-08 17:31:38.591350883 +0200
Karsten Hopp ac08c1
--- src/move.c	2015-09-09 20:40:43.264983747 +0200
Karsten Hopp ac08c1
***************
Karsten Hopp ac08c1
*** 1252,1262 ****
Karsten Hopp ac08c1
  	    }
Karsten Hopp ac08c1
  	    else
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
! #ifdef FEAT_DIFF
Karsten Hopp ac08c1
! 		done += plines_nofill(curwin->w_topline);
Karsten Hopp ac08c1
! #else
Karsten Hopp ac08c1
! 		done += plines(curwin->w_topline);
Karsten Hopp ac08c1
! #endif
Karsten Hopp ac08c1
  	}
Karsten Hopp ac08c1
  	--curwin->w_botline;		/* approximate w_botline */
Karsten Hopp ac08c1
  	invalidate_botline();
Karsten Hopp ac08c1
--- 1252,1258 ----
Karsten Hopp ac08c1
  	    }
Karsten Hopp ac08c1
  	    else
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
! 		done += PLINES_NOFILL(curwin->w_topline);
Karsten Hopp ac08c1
  	}
Karsten Hopp ac08c1
  	--curwin->w_botline;		/* approximate w_botline */
Karsten Hopp ac08c1
  	invalidate_botline();
Karsten Hopp ac08c1
***************
Karsten Hopp ac08c1
*** 1609,1621 ****
Karsten Hopp ac08c1
  	    lp->height = 1;
Karsten Hopp ac08c1
  	else
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
! 	{
Karsten Hopp ac08c1
! #ifdef FEAT_DIFF
Karsten Hopp ac08c1
! 	    lp->height = plines_nofill(lp->lnum);
Karsten Hopp ac08c1
! #else
Karsten Hopp ac08c1
! 	    lp->height = plines(lp->lnum);
Karsten Hopp ac08c1
! #endif
Karsten Hopp ac08c1
! 	}
Karsten Hopp ac08c1
      }
Karsten Hopp ac08c1
  }
Karsten Hopp ac08c1
  
Karsten Hopp ac08c1
--- 1605,1611 ----
Karsten Hopp ac08c1
  	    lp->height = 1;
Karsten Hopp ac08c1
  	else
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
! 	    lp->height = PLINES_NOFILL(lp->lnum);
Karsten Hopp ac08c1
      }
Karsten Hopp ac08c1
  }
Karsten Hopp ac08c1
  
Karsten Hopp ac08c1
***************
Karsten Hopp ac08c1
*** 1653,1663 ****
Karsten Hopp ac08c1
  	else
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
  	{
Karsten Hopp ac08c1
! #ifdef FEAT_DIFF
Karsten Hopp ac08c1
! 	    lp->height = plines_nofill(lp->lnum);
Karsten Hopp ac08c1
! #else
Karsten Hopp ac08c1
! 	    lp->height = plines(lp->lnum);
Karsten Hopp ac08c1
! #endif
Karsten Hopp ac08c1
  	}
Karsten Hopp ac08c1
      }
Karsten Hopp ac08c1
  }
Karsten Hopp ac08c1
--- 1643,1649 ----
Karsten Hopp ac08c1
  	else
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
  	{
Karsten Hopp ac08c1
! 	    lp->height = PLINES_NOFILL(lp->lnum);
Karsten Hopp ac08c1
  	}
Karsten Hopp ac08c1
      }
Karsten Hopp ac08c1
  }
Karsten Hopp ac08c1
***************
Karsten Hopp ac08c1
*** 1769,1775 ****
Karsten Hopp ac08c1
  	    i = 1;
Karsten Hopp ac08c1
  	else
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
! 	    i = plines_nofill(top);
Karsten Hopp ac08c1
  	used += i;
Karsten Hopp ac08c1
  	if (extra + i <= off && bot < curbuf->b_ml.ml_line_count)
Karsten Hopp ac08c1
  	{
Karsten Hopp ac08c1
--- 1755,1761 ----
Karsten Hopp ac08c1
  	    i = 1;
Karsten Hopp ac08c1
  	else
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
! 	    i = PLINES_NOFILL(top);
Karsten Hopp ac08c1
  	used += i;
Karsten Hopp ac08c1
  	if (extra + i <= off && bot < curbuf->b_ml.ml_line_count)
Karsten Hopp ac08c1
  	{
Karsten Hopp ac08c1
***************
Karsten Hopp ac08c1
*** 2273,2283 ****
Karsten Hopp ac08c1
  		++above;
Karsten Hopp ac08c1
  	    else
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
! #ifndef FEAT_DIFF
Karsten Hopp ac08c1
! 		above += plines(topline);
Karsten Hopp ac08c1
! #else
Karsten Hopp ac08c1
! 		above += plines_nofill(topline);
Karsten Hopp ac08c1
! 
Karsten Hopp ac08c1
  	    /* Count filler lines below this line as context. */
Karsten Hopp ac08c1
  	    if (topline < botline)
Karsten Hopp ac08c1
  		above += diff_check_fill(curwin, topline + 1);
Karsten Hopp ac08c1
--- 2259,2266 ----
Karsten Hopp ac08c1
  		++above;
Karsten Hopp ac08c1
  	    else
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
! 		above += PLINES_NOFILL(topline);
Karsten Hopp ac08c1
! #ifdef FEAT_DIFF
Karsten Hopp ac08c1
  	    /* Count filler lines below this line as context. */
Karsten Hopp ac08c1
  	    if (topline < botline)
Karsten Hopp ac08c1
  		above += diff_check_fill(curwin, topline + 1);
Karsten Hopp ac08c1
***************
Karsten Hopp ac08c1
*** 2666,2676 ****
Karsten Hopp ac08c1
  	    else
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
  	    {
Karsten Hopp ac08c1
! #ifdef FEAT_DIFF
Karsten Hopp ac08c1
! 		i = plines_nofill(curwin->w_topline);
Karsten Hopp ac08c1
! #else
Karsten Hopp ac08c1
! 		i = plines(curwin->w_topline);
Karsten Hopp ac08c1
! #endif
Karsten Hopp ac08c1
  		n -= i;
Karsten Hopp ac08c1
  		if (n < 0 && scrolled > 0)
Karsten Hopp ac08c1
  		    break;
Karsten Hopp ac08c1
--- 2649,2655 ----
Karsten Hopp ac08c1
  	    else
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
  	    {
Karsten Hopp ac08c1
! 		i = PLINES_NOFILL(curwin->w_topline);
Karsten Hopp ac08c1
  		n -= i;
Karsten Hopp ac08c1
  		if (n < 0 && scrolled > 0)
Karsten Hopp ac08c1
  		    break;
Karsten Hopp ac08c1
***************
Karsten Hopp ac08c1
*** 2776,2786 ****
Karsten Hopp ac08c1
  	    else
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
  	    {
Karsten Hopp ac08c1
! #ifdef FEAT_DIFF
Karsten Hopp ac08c1
! 		i = plines_nofill(curwin->w_topline - 1);
Karsten Hopp ac08c1
! #else
Karsten Hopp ac08c1
! 		i = plines(curwin->w_topline - 1);
Karsten Hopp ac08c1
! #endif
Karsten Hopp ac08c1
  		n -= i;
Karsten Hopp ac08c1
  		if (n < 0 && scrolled > 0)
Karsten Hopp ac08c1
  		    break;
Karsten Hopp ac08c1
--- 2755,2761 ----
Karsten Hopp ac08c1
  	    else
Karsten Hopp ac08c1
  #endif
Karsten Hopp ac08c1
  	    {
Karsten Hopp ac08c1
! 		i = PLINES_NOFILL(curwin->w_topline - 1);
Karsten Hopp ac08c1
  		n -= i;
Karsten Hopp ac08c1
  		if (n < 0 && scrolled > 0)
Karsten Hopp ac08c1
  		    break;
Karsten Hopp ac08c1
*** ../vim-7.4.862/src/version.c	2015-09-09 20:26:58.909675729 +0200
Karsten Hopp ac08c1
--- src/version.c	2015-09-09 20:28:25.236703587 +0200
Karsten Hopp ac08c1
***************
Karsten Hopp ac08c1
*** 743,744 ****
Karsten Hopp ac08c1
--- 743,746 ----
Karsten Hopp ac08c1
  {   /* Add new patch number below this line */
Karsten Hopp ac08c1
+ /**/
Karsten Hopp ac08c1
+     863,
Karsten Hopp ac08c1
  /**/
Karsten Hopp ac08c1
Karsten Hopp ac08c1
-- 
Karsten Hopp ac08c1
OLD WOMAN: Well, how did you become king, then?
Karsten Hopp ac08c1
ARTHUR: The Lady of the Lake, her arm clad in the purest shimmering samite,
Karsten Hopp ac08c1
        held Excalibur aloft from the bosom of the water to signify by Divine
Karsten Hopp ac08c1
        Providence ...  that I, Arthur, was to carry Excalibur ...  That is
Karsten Hopp ac08c1
        why I am your king!
Karsten Hopp ac08c1
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp ac08c1
Karsten Hopp ac08c1
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp ac08c1
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp ac08c1
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp ac08c1
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///