summaryrefslogtreecommitdiffstats
path: root/src/globals.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-22 17:07:50 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-22 17:07:50 +0100
commit3d1491ed2394b3e92902102879bace28a5f9c201 (patch)
tree390dc467cce98e4c2058c6d38f6cc1cc19044a45 /src/globals.h
parent9752c72f492312acd1c84e673864faed31a3bc97 (diff)
patch 8.1.0623: iterating through window frames is repeatedv8.1.0623
Problem: Iterating through window frames is repeated. Solution: Define FOR_ALL_FRAMES. (Yegappan Lakshmanan)
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 67fcb4b058..0a29511434 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -564,6 +564,8 @@ 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_FRAMES(frp, first_frame) \
+ for (frp = first_frame; frp != NULL; frp = frp->fr_next)
# define FOR_ALL_TABPAGES(tp) for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
# define FOR_ALL_WINDOWS_IN_TAB(tp, wp) \
for ((wp) = ((tp) == NULL || (tp) == curtab) \