0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

updated for version 7.1-060

This commit is contained in:
Bram Moolenaar
2007-08-11 11:39:45 +00:00
parent 225d32b910
commit 48cc5fe8b6
2 changed files with 65 additions and 20 deletions

View File

@@ -666,6 +666,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
60,
/**/ /**/
59, 59,
/**/ /**/

View File

@@ -2121,7 +2121,7 @@ win_close(win, free_buf)
if (wp->w_p_pvw || bt_quickfix(wp->w_buffer)) if (wp->w_p_pvw || bt_quickfix(wp->w_buffer))
{ {
/* /*
* The cursor goes to the preview or the quickfix window, try * If the cursor goes to the preview or the quickfix window, try
* finding another window to go to. * finding another window to go to.
*/ */
for (;;) for (;;)
@@ -2308,7 +2308,6 @@ winframe_remove(win, dirp, tp)
frame_T *frp, *frp2, *frp3; frame_T *frp, *frp2, *frp3;
frame_T *frp_close = win->w_frame; frame_T *frp_close = win->w_frame;
win_T *wp; win_T *wp;
int old_size = 0;
/* /*
* If there is only one window there is nothing to remove. * If there is only one window there is nothing to remove.
@@ -2329,33 +2328,77 @@ winframe_remove(win, dirp, tp)
if (frp_close->fr_parent->fr_layout == FR_COL) if (frp_close->fr_parent->fr_layout == FR_COL)
{ {
#endif #endif
/* When 'winfixheight' is set, remember its old size and restore /* When 'winfixheight' is set, try to find another frame in the column
* it later (it's a simplistic solution...). Don't do this if the * (as close to the closed frame as possible) to distribute the height
* window will occupy the full height of the screen. */ * to. */
if (frp2->fr_win != NULL if (frp2->fr_win != NULL && frp2->fr_win->w_p_wfh)
&& (frp2->fr_next != NULL || frp2->fr_prev != NULL) {
&& frp2->fr_win->w_p_wfh) frp = frp_close->fr_prev;
old_size = frp2->fr_win->w_height; frp3 = frp_close->fr_next;
while (frp != NULL || frp3 != NULL)
{
if (frp != NULL)
{
if (frp->fr_win != NULL && !frp->fr_win->w_p_wfh)
{
frp2 = frp;
wp = frp->fr_win;
break;
}
frp = frp->fr_prev;
}
if (frp3 != NULL)
{
if (frp3->fr_win != NULL && !frp3->fr_win->w_p_wfh)
{
frp2 = frp3;
wp = frp3->fr_win;
break;
}
frp3 = frp3->fr_next;
}
}
}
frame_new_height(frp2, frp2->fr_height + frp_close->fr_height, frame_new_height(frp2, frp2->fr_height + frp_close->fr_height,
frp2 == frp_close->fr_next ? TRUE : FALSE, FALSE); frp2 == frp_close->fr_next ? TRUE : FALSE, FALSE);
if (old_size != 0)
win_setheight_win(old_size, frp2->fr_win);
#ifdef FEAT_VERTSPLIT #ifdef FEAT_VERTSPLIT
*dirp = 'v'; *dirp = 'v';
} }
else else
{ {
/* When 'winfixwidth' is set, remember its old size and restore /* When 'winfixwidth' is set, try to find another frame in the column
* it later (it's a simplistic solution...). Don't do this if the * (as close to the closed frame as possible) to distribute the width
* window will occupy the full width of the screen. */ * to. */
if (frp2->fr_win != NULL if (frp2->fr_win != NULL && frp2->fr_win->w_p_wfw)
&& (frp2->fr_next != NULL || frp2->fr_prev != NULL) {
&& frp2->fr_win->w_p_wfw) frp = frp_close->fr_prev;
old_size = frp2->fr_win->w_width; frp3 = frp_close->fr_next;
while (frp != NULL || frp3 != NULL)
{
if (frp != NULL)
{
if (frp->fr_win != NULL && !frp->fr_win->w_p_wfw)
{
frp2 = frp;
wp = frp->fr_win;
break;
}
frp = frp->fr_prev;
}
if (frp3 != NULL)
{
if (frp3->fr_win != NULL && !frp3->fr_win->w_p_wfw)
{
frp2 = frp3;
wp = frp3->fr_win;
break;
}
frp3 = frp3->fr_next;
}
}
}
frame_new_width(frp2, frp2->fr_width + frp_close->fr_width, frame_new_width(frp2, frp2->fr_width + frp_close->fr_width,
frp2 == frp_close->fr_next ? TRUE : FALSE, FALSE); frp2 == frp_close->fr_next ? TRUE : FALSE, FALSE);
if (old_size != 0)
win_setwidth_win(old_size, frp2->fr_win);
*dirp = 'h'; *dirp = 'h';
} }
#endif #endif