summaryrefslogtreecommitdiffstats
path: root/src/globals.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-11-06 15:25:42 +0100
committerBram Moolenaar <Bram@vim.org>2016-11-06 15:25:42 +0100
commita1f4cb93ba50ea9e40cd4b1f5592b8a6d1398660 (patch)
treef2b42367e5ced2e5c070683fafb1a75b360086c4 /src/globals.h
parent25de4c232d580583feadae11ab34e3cc6333c350 (diff)
patch 8.0.0069v8.0.0069
Problem: Compiler warning for self-comparison. Solution: Define ONE_WINDOW and add #ifdef.
Diffstat (limited to 'src/globals.h')
-rw-r--r--src/globals.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/globals.h b/src/globals.h
index ffcadb737a..fea9543a78 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -546,6 +546,7 @@ EXTERN int clip_unnamed_saved INIT(= 0);
EXTERN win_T *firstwin; /* first window */
EXTERN win_T *lastwin; /* last window */
EXTERN win_T *prevwin INIT(= NULL); /* previous window */
+# define ONE_WINDOW (firstwin == lastwin)
# define W_NEXT(wp) ((wp)->w_next)
# define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
# define FOR_ALL_TABPAGES(tp) for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
@@ -563,6 +564,7 @@ EXTERN win_T *prevwin INIT(= NULL); /* previous window */
#else
# define firstwin curwin
# define lastwin curwin
+# define ONE_WINDOW 1
# define W_NEXT(wp) NULL
# define FOR_ALL_WINDOWS(wp) wp = curwin;
# define FOR_ALL_TABPAGES(tp) for (;FALSE;)