summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-11-10 18:16:33 +0100
committerBram Moolenaar <Bram@vim.org>2016-11-10 18:16:33 +0100
commit459ca563128f2edb7e3bb190090bbb755a56dd55 (patch)
tree655c20d3f6b48349cb54d54c2812cfdbac3175fc /src/window.c
parent38bc49563782ee1cb91660e58acf1afe1a31020a (diff)
downloadvim-git-459ca563128f2edb7e3bb190090bbb755a56dd55.tar.gz
patch 8.0.0073v8.0.0073
Problem: More comparisons between firstwin and lastwin. Solution: Use ONE_WINDOW for consistency. (Hirohito Higashi)
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/window.c b/src/window.c
index 17656d54a..c4448b77e 100644
--- a/src/window.c
+++ b/src/window.c
@@ -791,7 +791,7 @@ win_split_ins(
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)
{
@@ -1492,7 +1492,7 @@ win_exchange(long Prenum)
win_T *wp2;
int temp;
- if (lastwin == firstwin) /* just one window */
+ if (ONE_WINDOW) /* just one window */
{
beep_flush();
return;
@@ -1674,7 +1674,7 @@ win_totop(int size, int flags)
int dir;
int height = curwin->w_height;
- if (lastwin == firstwin)
+ if (ONE_WINDOW)
{
beep_flush();
return;
@@ -2123,7 +2123,7 @@ close_windows(
++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
@@ -3373,7 +3373,7 @@ close_others(
}
}
- if (message && lastwin != firstwin)
+ if (message && !ONE_WINDOW)
EMSG(_("E445: Other window contains changes"));
}
@@ -5971,7 +5971,7 @@ last_status(
{
/* 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