jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.377

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