|
Karsten Hopp |
ff7635 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
ff7635 |
Subject: Patch 7.4.372
|
|
Karsten Hopp |
ff7635 |
Fcc: outbox
|
|
Karsten Hopp |
ff7635 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
ff7635 |
Mime-Version: 1.0
|
|
Karsten Hopp |
ff7635 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
ff7635 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
ff7635 |
------------
|
|
Karsten Hopp |
ff7635 |
|
|
Karsten Hopp |
ff7635 |
Patch 7.4.372
|
|
Karsten Hopp |
ff7635 |
Problem: When 'winminheight' is zero there might not be one line for the
|
|
Karsten Hopp |
ff7635 |
current window.
|
|
Karsten Hopp |
ff7635 |
Solution: Change the size computations. (Yukihiro Nakadaira)
|
|
Karsten Hopp |
ff7635 |
Files: src/window.c
|
|
Karsten Hopp |
ff7635 |
|
|
Karsten Hopp |
ff7635 |
|
|
Karsten Hopp |
ff7635 |
*** ../vim-7.4.371/src/window.c 2014-07-16 16:30:21.647608710 +0200
|
|
Karsten Hopp |
ff7635 |
--- src/window.c 2014-07-16 18:06:53.123491001 +0200
|
|
Karsten Hopp |
ff7635 |
***************
|
|
Karsten Hopp |
ff7635 |
*** 688,693 ****
|
|
Karsten Hopp |
ff7635 |
--- 688,695 ----
|
|
Karsten Hopp |
ff7635 |
int before;
|
|
Karsten Hopp |
ff7635 |
int minwidth;
|
|
Karsten Hopp |
ff7635 |
int minheight;
|
|
Karsten Hopp |
ff7635 |
+ int wmw1;
|
|
Karsten Hopp |
ff7635 |
+ int wmh1;
|
|
Karsten Hopp |
ff7635 |
|
|
Karsten Hopp |
ff7635 |
if (flags & WSP_TOP)
|
|
Karsten Hopp |
ff7635 |
oldwin = firstwin;
|
|
Karsten Hopp |
ff7635 |
***************
|
|
Karsten Hopp |
ff7635 |
*** 722,740 ****
|
|
Karsten Hopp |
ff7635 |
* Check if we are able to split the current window and compute its
|
|
Karsten Hopp |
ff7635 |
* width.
|
|
Karsten Hopp |
ff7635 |
*/
|
|
Karsten Hopp |
ff7635 |
! needed = p_wmw + 1;
|
|
Karsten Hopp |
ff7635 |
if (flags & WSP_ROOM)
|
|
Karsten Hopp |
ff7635 |
! needed += p_wiw - p_wmw;
|
|
Karsten Hopp |
ff7635 |
if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
|
|
Karsten Hopp |
ff7635 |
{
|
|
Karsten Hopp |
ff7635 |
! minwidth = frame_minwidth(topframe, NULL);
|
|
Karsten Hopp |
ff7635 |
available = topframe->fr_width;
|
|
Karsten Hopp |
ff7635 |
needed += minwidth;
|
|
Karsten Hopp |
ff7635 |
}
|
|
Karsten Hopp |
ff7635 |
else
|
|
Karsten Hopp |
ff7635 |
{
|
|
Karsten Hopp |
ff7635 |
! minwidth = frame_minwidth(oldwin->w_frame, NULL);
|
|
Karsten Hopp |
ff7635 |
! available = oldwin->w_width;
|
|
Karsten Hopp |
ff7635 |
}
|
|
Karsten Hopp |
ff7635 |
if (available < needed && new_wp == NULL)
|
|
Karsten Hopp |
ff7635 |
{
|
|
Karsten Hopp |
ff7635 |
--- 724,745 ----
|
|
Karsten Hopp |
ff7635 |
* Check if we are able to split the current window and compute its
|
|
Karsten Hopp |
ff7635 |
* width.
|
|
Karsten Hopp |
ff7635 |
*/
|
|
Karsten Hopp |
ff7635 |
! /* Current window requires at least 1 space. */
|
|
Karsten Hopp |
ff7635 |
! wmw1 = (p_wmw == 0 ? 1 : p_wmw);
|
|
Karsten Hopp |
ff7635 |
! needed = wmw1 + 1;
|
|
Karsten Hopp |
ff7635 |
if (flags & WSP_ROOM)
|
|
Karsten Hopp |
ff7635 |
! needed += p_wiw - wmw1;
|
|
Karsten Hopp |
ff7635 |
if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
|
|
Karsten Hopp |
ff7635 |
{
|
|
Karsten Hopp |
ff7635 |
! minwidth = frame_minwidth(topframe, NOWIN);
|
|
Karsten Hopp |
ff7635 |
available = topframe->fr_width;
|
|
Karsten Hopp |
ff7635 |
needed += minwidth;
|
|
Karsten Hopp |
ff7635 |
}
|
|
Karsten Hopp |
ff7635 |
else
|
|
Karsten Hopp |
ff7635 |
{
|
|
Karsten Hopp |
ff7635 |
! minwidth = frame_minwidth(oldwin->w_frame, NOWIN);
|
|
Karsten Hopp |
ff7635 |
! available = oldwin->w_frame->fr_width;
|
|
Karsten Hopp |
ff7635 |
! needed += minwidth;
|
|
Karsten Hopp |
ff7635 |
}
|
|
Karsten Hopp |
ff7635 |
if (available < needed && new_wp == NULL)
|
|
Karsten Hopp |
ff7635 |
{
|
|
Karsten Hopp |
ff7635 |
***************
|
|
Karsten Hopp |
ff7635 |
*** 743,754 ****
|
|
Karsten Hopp |
ff7635 |
}
|
|
Karsten Hopp |
ff7635 |
if (new_size == 0)
|
|
Karsten Hopp |
ff7635 |
new_size = oldwin->w_width / 2;
|
|
Karsten Hopp |
ff7635 |
- if (new_size > oldwin->w_width - p_wmw - 1)
|
|
Karsten Hopp |
ff7635 |
- new_size = oldwin->w_width - p_wmw - 1;
|
|
Karsten Hopp |
ff7635 |
if (new_size > available - minwidth - 1)
|
|
Karsten Hopp |
ff7635 |
new_size = available - minwidth - 1;
|
|
Karsten Hopp |
ff7635 |
! if (new_size < p_wmw)
|
|
Karsten Hopp |
ff7635 |
! new_size = p_wmw;
|
|
Karsten Hopp |
ff7635 |
|
|
Karsten Hopp |
ff7635 |
/* if it doesn't fit in the current window, need win_equal() */
|
|
Karsten Hopp |
ff7635 |
if (oldwin->w_width - new_size - 1 < p_wmw)
|
|
Karsten Hopp |
ff7635 |
--- 748,757 ----
|
|
Karsten Hopp |
ff7635 |
}
|
|
Karsten Hopp |
ff7635 |
if (new_size == 0)
|
|
Karsten Hopp |
ff7635 |
new_size = oldwin->w_width / 2;
|
|
Karsten Hopp |
ff7635 |
if (new_size > available - minwidth - 1)
|
|
Karsten Hopp |
ff7635 |
new_size = available - minwidth - 1;
|
|
Karsten Hopp |
ff7635 |
! if (new_size < wmw1)
|
|
Karsten Hopp |
ff7635 |
! new_size = wmw1;
|
|
Karsten Hopp |
ff7635 |
|
|
Karsten Hopp |
ff7635 |
/* if it doesn't fit in the current window, need win_equal() */
|
|
Karsten Hopp |
ff7635 |
if (oldwin->w_width - new_size - 1 < p_wmw)
|
|
Karsten Hopp |
ff7635 |
***************
|
|
Karsten Hopp |
ff7635 |
*** 789,808 ****
|
|
Karsten Hopp |
ff7635 |
* Check if we are able to split the current window and compute its
|
|
Karsten Hopp |
ff7635 |
* height.
|
|
Karsten Hopp |
ff7635 |
*/
|
|
Karsten Hopp |
ff7635 |
! needed = p_wmh + STATUS_HEIGHT + need_status;
|
|
Karsten Hopp |
ff7635 |
if (flags & WSP_ROOM)
|
|
Karsten Hopp |
ff7635 |
! needed += p_wh - p_wmh;
|
|
Karsten Hopp |
ff7635 |
if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
|
|
Karsten Hopp |
ff7635 |
{
|
|
Karsten Hopp |
ff7635 |
! minheight = frame_minheight(topframe, NULL);
|
|
Karsten Hopp |
ff7635 |
available = topframe->fr_height;
|
|
Karsten Hopp |
ff7635 |
needed += minheight;
|
|
Karsten Hopp |
ff7635 |
}
|
|
Karsten Hopp |
ff7635 |
else
|
|
Karsten Hopp |
ff7635 |
{
|
|
Karsten Hopp |
ff7635 |
! minheight = frame_minheight(oldwin->w_frame, NULL);
|
|
Karsten Hopp |
ff7635 |
! available = oldwin->w_height;
|
|
Karsten Hopp |
ff7635 |
! needed += p_wmh;
|
|
Karsten Hopp |
ff7635 |
}
|
|
Karsten Hopp |
ff7635 |
if (available < needed && new_wp == NULL)
|
|
Karsten Hopp |
ff7635 |
{
|
|
Karsten Hopp |
ff7635 |
--- 792,813 ----
|
|
Karsten Hopp |
ff7635 |
* Check if we are able to split the current window and compute its
|
|
Karsten Hopp |
ff7635 |
* height.
|
|
Karsten Hopp |
ff7635 |
*/
|
|
Karsten Hopp |
ff7635 |
! /* Current window requires at least 1 space. */
|
|
Karsten Hopp |
ff7635 |
! wmh1 = (p_wmh == 0 ? 1 : p_wmh);
|
|
Karsten Hopp |
ff7635 |
! needed = wmh1 + STATUS_HEIGHT;
|
|
Karsten Hopp |
ff7635 |
if (flags & WSP_ROOM)
|
|
Karsten Hopp |
ff7635 |
! needed += p_wh - wmh1;
|
|
Karsten Hopp |
ff7635 |
if (p_ea || (flags & (WSP_BOT | WSP_TOP)))
|
|
Karsten Hopp |
ff7635 |
{
|
|
Karsten Hopp |
ff7635 |
! minheight = frame_minheight(topframe, NOWIN) + need_status;
|
|
Karsten Hopp |
ff7635 |
available = topframe->fr_height;
|
|
Karsten Hopp |
ff7635 |
needed += minheight;
|
|
Karsten Hopp |
ff7635 |
}
|
|
Karsten Hopp |
ff7635 |
else
|
|
Karsten Hopp |
ff7635 |
{
|
|
Karsten Hopp |
ff7635 |
! minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status;
|
|
Karsten Hopp |
ff7635 |
! available = oldwin->w_frame->fr_height;
|
|
Karsten Hopp |
ff7635 |
! needed += minheight;
|
|
Karsten Hopp |
ff7635 |
}
|
|
Karsten Hopp |
ff7635 |
if (available < needed && new_wp == NULL)
|
|
Karsten Hopp |
ff7635 |
{
|
|
Karsten Hopp |
ff7635 |
***************
|
|
Karsten Hopp |
ff7635 |
*** 817,829 ****
|
|
Karsten Hopp |
ff7635 |
}
|
|
Karsten Hopp |
ff7635 |
if (new_size == 0)
|
|
Karsten Hopp |
ff7635 |
new_size = oldwin_height / 2;
|
|
Karsten Hopp |
ff7635 |
-
|
|
Karsten Hopp |
ff7635 |
- if (new_size > oldwin_height - p_wmh - STATUS_HEIGHT)
|
|
Karsten Hopp |
ff7635 |
- new_size = oldwin_height - p_wmh - STATUS_HEIGHT;
|
|
Karsten Hopp |
ff7635 |
if (new_size > available - minheight - STATUS_HEIGHT)
|
|
Karsten Hopp |
ff7635 |
new_size = available - minheight - STATUS_HEIGHT;
|
|
Karsten Hopp |
ff7635 |
! if (new_size < p_wmh)
|
|
Karsten Hopp |
ff7635 |
! new_size = p_wmh;
|
|
Karsten Hopp |
ff7635 |
|
|
Karsten Hopp |
ff7635 |
/* if it doesn't fit in the current window, need win_equal() */
|
|
Karsten Hopp |
ff7635 |
if (oldwin_height - new_size - STATUS_HEIGHT < p_wmh)
|
|
Karsten Hopp |
ff7635 |
--- 822,831 ----
|
|
Karsten Hopp |
ff7635 |
}
|
|
Karsten Hopp |
ff7635 |
if (new_size == 0)
|
|
Karsten Hopp |
ff7635 |
new_size = oldwin_height / 2;
|
|
Karsten Hopp |
ff7635 |
if (new_size > available - minheight - STATUS_HEIGHT)
|
|
Karsten Hopp |
ff7635 |
new_size = available - minheight - STATUS_HEIGHT;
|
|
Karsten Hopp |
ff7635 |
! if (new_size < wmh1)
|
|
Karsten Hopp |
ff7635 |
! new_size = wmh1;
|
|
Karsten Hopp |
ff7635 |
|
|
Karsten Hopp |
ff7635 |
/* if it doesn't fit in the current window, need win_equal() */
|
|
Karsten Hopp |
ff7635 |
if (oldwin_height - new_size - STATUS_HEIGHT < p_wmh)
|
|
Karsten Hopp |
ff7635 |
*** ../vim-7.4.371/src/version.c 2014-07-16 17:29:46.691536252 +0200
|
|
Karsten Hopp |
ff7635 |
--- src/version.c 2014-07-16 17:34:14.795530803 +0200
|
|
Karsten Hopp |
ff7635 |
***************
|
|
Karsten Hopp |
ff7635 |
*** 736,737 ****
|
|
Karsten Hopp |
ff7635 |
--- 736,739 ----
|
|
Karsten Hopp |
ff7635 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
ff7635 |
+ /**/
|
|
Karsten Hopp |
ff7635 |
+ 372,
|
|
Karsten Hopp |
ff7635 |
/**/
|
|
Karsten Hopp |
ff7635 |
|
|
Karsten Hopp |
ff7635 |
--
|
|
Karsten Hopp |
ff7635 |
[The rest of the ARMY stand around looking at a loss.]
|
|
Karsten Hopp |
ff7635 |
INSPECTOR END OF FILM: (picks up megaphone) All right! Clear off! Go on!
|
|
Karsten Hopp |
ff7635 |
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
|
|
Karsten Hopp |
ff7635 |
|
|
Karsten Hopp |
ff7635 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
ff7635 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
ff7635 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
ff7635 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|