Karsten Hopp 61a3f2
To: vim_dev@googlegroups.com
Karsten Hopp 61a3f2
Subject: Patch 7.4.377
Karsten Hopp 61a3f2
Fcc: outbox
Karsten Hopp 61a3f2
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 61a3f2
Mime-Version: 1.0
Karsten Hopp 61a3f2
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 61a3f2
Content-Transfer-Encoding: 8bit
Karsten Hopp 61a3f2
------------
Karsten Hopp 61a3f2
Karsten Hopp 61a3f2
Patch 7.4.377
Karsten Hopp 61a3f2
Problem:    When 'equalalways' is set a split may report "no room" even though
Karsten Hopp 61a3f2
	    there is plenty of room.
Karsten Hopp 61a3f2
Solution:   Compute the available room properly. (Yukihiro Nakadaira)
Karsten Hopp 61a3f2
Files:	    src/window.c
Karsten Hopp 61a3f2
Karsten Hopp 61a3f2
Karsten Hopp 61a3f2
*** ../vim-7.4.376/src/window.c	2014-07-16 23:39:50.251084976 +0200
Karsten Hopp 61a3f2
--- src/window.c	2014-07-23 15:19:10.491918366 +0200
Karsten Hopp 61a3f2
***************
Karsten Hopp 61a3f2
*** 684,690 ****
Karsten Hopp 61a3f2
      int		available;
Karsten Hopp 61a3f2
      int		oldwin_height = 0;
Karsten Hopp 61a3f2
      int		layout;
Karsten Hopp 61a3f2
!     frame_T	*frp, *curfrp;
Karsten Hopp 61a3f2
      int		before;
Karsten Hopp 61a3f2
      int		minheight;
Karsten Hopp 61a3f2
      int		wmh1;
Karsten Hopp 61a3f2
--- 684,690 ----
Karsten Hopp 61a3f2
      int		available;
Karsten Hopp 61a3f2
      int		oldwin_height = 0;
Karsten Hopp 61a3f2
      int		layout;
Karsten Hopp 61a3f2
!     frame_T	*frp, *curfrp, *frp2, *prevfrp;
Karsten Hopp 61a3f2
      int		before;
Karsten Hopp 61a3f2
      int		minheight;
Karsten Hopp 61a3f2
      int		wmh1;
Karsten Hopp 61a3f2
***************
Karsten Hopp 61a3f2
*** 730,741 ****
Karsten Hopp 61a3f2
  	needed = wmw1 + 1;
Karsten Hopp 61a3f2
  	if (flags & WSP_ROOM)
Karsten Hopp 61a3f2
  	    needed += p_wiw - wmw1;
Karsten Hopp 61a3f2
! 	if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
Karsten Hopp 61a3f2
  	{
Karsten Hopp 61a3f2
  	    minwidth = frame_minwidth(topframe, NOWIN);
Karsten Hopp 61a3f2
  	    available = topframe->fr_width;
Karsten Hopp 61a3f2
  	    needed += minwidth;
Karsten Hopp 61a3f2
  	}
Karsten Hopp 61a3f2
  	else
Karsten Hopp 61a3f2
  	{
Karsten Hopp 61a3f2
  	    minwidth = frame_minwidth(oldwin->w_frame, NOWIN);
Karsten Hopp 61a3f2
--- 730,758 ----
Karsten Hopp 61a3f2
  	needed = wmw1 + 1;
Karsten Hopp 61a3f2
  	if (flags & WSP_ROOM)
Karsten Hopp 61a3f2
  	    needed += p_wiw - wmw1;
Karsten Hopp 61a3f2
! 	if (flags & (WSP_BOT | WSP_TOP))
Karsten Hopp 61a3f2
  	{
Karsten Hopp 61a3f2
  	    minwidth = frame_minwidth(topframe, NOWIN);
Karsten Hopp 61a3f2
  	    available = topframe->fr_width;
Karsten Hopp 61a3f2
  	    needed += minwidth;
Karsten Hopp 61a3f2
  	}
Karsten Hopp 61a3f2
+ 	else if (p_ea)
Karsten Hopp 61a3f2
+ 	{
Karsten Hopp 61a3f2
+ 	    minwidth = frame_minwidth(oldwin->w_frame, NOWIN);
Karsten Hopp 61a3f2
+ 	    prevfrp = oldwin->w_frame;
Karsten Hopp 61a3f2
+ 	    for (frp = oldwin->w_frame->fr_parent; frp != NULL;
Karsten Hopp 61a3f2
+ 							frp = frp->fr_parent)
Karsten Hopp 61a3f2
+ 	    {
Karsten Hopp 61a3f2
+ 		if (frp->fr_layout == FR_ROW)
Karsten Hopp 61a3f2
+ 		    for (frp2 = frp->fr_child; frp2 != NULL;
Karsten Hopp 61a3f2
+ 							frp2 = frp2->fr_next)
Karsten Hopp 61a3f2
+ 			if (frp2 != prevfrp)
Karsten Hopp 61a3f2
+ 			    minwidth += frame_minwidth(frp2, NOWIN);
Karsten Hopp 61a3f2
+ 		prevfrp = frp;
Karsten Hopp 61a3f2
+ 	    }
Karsten Hopp 61a3f2
+ 	    available = topframe->fr_width;
Karsten Hopp 61a3f2
+ 	    needed += minwidth;
Karsten Hopp 61a3f2
+ 	}
Karsten Hopp 61a3f2
  	else
Karsten Hopp 61a3f2
  	{
Karsten Hopp 61a3f2
  	    minwidth = frame_minwidth(oldwin->w_frame, NOWIN);
Karsten Hopp 61a3f2
***************
Karsten Hopp 61a3f2
*** 798,809 ****
Karsten Hopp 61a3f2
  	needed = wmh1 + STATUS_HEIGHT;
Karsten Hopp 61a3f2
  	if (flags & WSP_ROOM)
Karsten Hopp 61a3f2
  	    needed += p_wh - wmh1;
Karsten Hopp 61a3f2
! 	if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
Karsten Hopp 61a3f2
  	{
Karsten Hopp 61a3f2
  	    minheight = frame_minheight(topframe, NOWIN) + need_status;
Karsten Hopp 61a3f2
  	    available = topframe->fr_height;
Karsten Hopp 61a3f2
  	    needed += minheight;
Karsten Hopp 61a3f2
  	}
Karsten Hopp 61a3f2
  	else
Karsten Hopp 61a3f2
  	{
Karsten Hopp 61a3f2
  	    minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status;
Karsten Hopp 61a3f2
--- 815,843 ----
Karsten Hopp 61a3f2
  	needed = wmh1 + STATUS_HEIGHT;
Karsten Hopp 61a3f2
  	if (flags & WSP_ROOM)
Karsten Hopp 61a3f2
  	    needed += p_wh - wmh1;
Karsten Hopp 61a3f2
! 	if (flags & (WSP_BOT | WSP_TOP))
Karsten Hopp 61a3f2
  	{
Karsten Hopp 61a3f2
  	    minheight = frame_minheight(topframe, NOWIN) + need_status;
Karsten Hopp 61a3f2
  	    available = topframe->fr_height;
Karsten Hopp 61a3f2
  	    needed += minheight;
Karsten Hopp 61a3f2
  	}
Karsten Hopp 61a3f2
+ 	else if (p_ea)
Karsten Hopp 61a3f2
+ 	{
Karsten Hopp 61a3f2
+ 	    minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status;
Karsten Hopp 61a3f2
+ 	    prevfrp = oldwin->w_frame;
Karsten Hopp 61a3f2
+ 	    for (frp = oldwin->w_frame->fr_parent; frp != NULL;
Karsten Hopp 61a3f2
+ 							frp = frp->fr_parent)
Karsten Hopp 61a3f2
+ 	    {
Karsten Hopp 61a3f2
+ 		if (frp->fr_layout == FR_COL)
Karsten Hopp 61a3f2
+ 		    for (frp2 = frp->fr_child; frp2 != NULL;
Karsten Hopp 61a3f2
+ 							frp2 = frp2->fr_next)
Karsten Hopp 61a3f2
+ 			if (frp2 != prevfrp)
Karsten Hopp 61a3f2
+ 			    minheight += frame_minheight(frp2, NOWIN);
Karsten Hopp 61a3f2
+ 		prevfrp = frp;
Karsten Hopp 61a3f2
+ 	    }
Karsten Hopp 61a3f2
+ 	    available = topframe->fr_height;
Karsten Hopp 61a3f2
+ 	    needed += minheight;
Karsten Hopp 61a3f2
+ 	}
Karsten Hopp 61a3f2
  	else
Karsten Hopp 61a3f2
  	{
Karsten Hopp 61a3f2
  	    minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status;
Karsten Hopp 61a3f2
*** ../vim-7.4.376/src/version.c	2014-07-23 13:50:41.839956521 +0200
Karsten Hopp 61a3f2
--- src/version.c	2014-07-23 15:20:33.227917771 +0200
Karsten Hopp 61a3f2
***************
Karsten Hopp 61a3f2
*** 736,737 ****
Karsten Hopp 61a3f2
--- 736,739 ----
Karsten Hopp 61a3f2
  {   /* Add new patch number below this line */
Karsten Hopp 61a3f2
+ /**/
Karsten Hopp 61a3f2
+     377,
Karsten Hopp 61a3f2
  /**/
Karsten Hopp 61a3f2
Karsten Hopp 61a3f2
-- 
Karsten Hopp 61a3f2
LARGE MAN:   Who's that then?
Karsten Hopp 61a3f2
CART DRIVER: (Grudgingly) I dunno, Must be a king.
Karsten Hopp 61a3f2
LARGE MAN:   Why?
Karsten Hopp 61a3f2
CART DRIVER: He hasn't got shit all over him.
Karsten Hopp 61a3f2
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp 61a3f2
Karsten Hopp 61a3f2
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 61a3f2
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 61a3f2
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 61a3f2
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///