Problem: More comparisons between firstwin and lastwin.
Solution: Use ONE_WINDOW for consistency. (Hirohito Higashi)
# ifdef FEAT_AUTOCMD
&& !(curwin->w_closing || curwin->w_buffer->b_locked > 0)
# endif
- && (firstwin != lastwin || first_tabpage->tp_next != NULL))
+ && (!ONE_WINDOW || first_tabpage->tp_next != NULL))
{
if (win_close(curwin, FALSE) == FAIL)
break;
: wp->w_width != Columns)
|| (had_tab > 0 && wp != firstwin)
#endif
- ) && firstwin != lastwin
+ ) && !ONE_WINDOW
#ifdef FEAT_AUTOCMD
&& !(wp->w_closing || wp->w_buffer->b_locked > 0)
#endif
if (eap->forceit)
bigness = curwin->w_height;
#ifdef FEAT_WINDOWS
- else if (firstwin != lastwin)
+ else if (!ONE_WINDOW)
bigness = curwin->w_height - 3;
#endif
else
{
/* First close all the windows but the current one. If that worked then
* close the last window in this tab, that will close it. */
- if (lastwin != firstwin)
+ if (!ONE_WINDOW)
close_others(TRUE, forceit);
- if (lastwin == firstwin)
+ if (ONE_WINDOW)
ex_win_close(forceit, curwin, NULL);
# ifdef FEAT_GUI
need_mouse_correct = TRUE;
}
/* Change window height NOW */
- if (lastwin != firstwin)
+ if (!ONE_WINDOW)
{
if (pp == &p_wh && curwin->w_height < p_wh)
win_setheight((int)p_wh);
}
/* Change window width NOW */
- if (lastwin != firstwin && curwin->w_width < p_wiw)
+ if (!ONE_WINDOW && curwin->w_width < p_wiw)
win_setwidth((int)p_wiw);
}
comp_col(void)
{
#if defined(FEAT_CMDL_INFO) && defined(FEAT_WINDOWS)
- int last_has_status = (p_ls == 2 || (p_ls == 1 && firstwin != lastwin));
+ int last_has_status = (p_ls == 2 || (p_ls == 1 && !ONE_WINDOW));
sc_col = 0;
ru_col = 0;
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 73,
/**/
72,
/**/
oldwin = curwin;
/* add a status line when p_ls == 1 and splitting the first window */
- if (lastwin == firstwin && p_ls == 1 && oldwin->w_status_height == 0)
+ if (ONE_WINDOW && p_ls == 1 && oldwin->w_status_height == 0)
{
if (oldwin->w_height <= p_wmh && new_wp == NULL)
{
win_T *wp2;
int temp;
- if (lastwin == firstwin) /* just one window */
+ if (ONE_WINDOW) /* just one window */
{
beep_flush();
return;
int dir;
int height = curwin->w_height;
- if (lastwin == firstwin)
+ if (ONE_WINDOW)
{
beep_flush();
return;
++RedrawingDisabled;
- for (wp = firstwin; wp != NULL && lastwin != firstwin; )
+ for (wp = firstwin; wp != NULL && !ONE_WINDOW; )
{
if (wp->w_buffer == buf && (!keep_curwin || wp != curwin)
#ifdef FEAT_AUTOCMD
}
}
- if (message && lastwin != firstwin)
+ if (message && !ONE_WINDOW)
EMSG(_("E445: Other window contains changes"));
}
{
/* Don't make a difference between horizontal or vertical split. */
last_status_rec(topframe, (p_ls == 2
- || (p_ls == 1 && (morewin || lastwin != firstwin))));
+ || (p_ls == 1 && (morewin || !ONE_WINDOW))));
}
static void