diff src/globals.h @ 3340:539613ce999d v7.3.437

updated for version 7.3.437 Problem: Continue looping inside FOR_ALL_TAB_WINDOWS even when already done. Solution: Use goto instead of break. (Hirohito Higashi)
author Bram Moolenaar <bram@vim.org>
date Sat, 11 Feb 2012 23:45:37 +0100
parents c70c005f61fb
children 3b5f541269e2
line wrap: on
line diff
--- a/src/globals.h
+++ b/src/globals.h
@@ -535,6 +535,10 @@ EXTERN win_T	*lastwin;		/* last window *
 EXTERN win_T	*prevwin INIT(= NULL);	/* previous window */
 # define W_NEXT(wp) ((wp)->w_next)
 # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
+/*
+ * When using this macro "break" only breaks out of the inner loop. Use "goto"
+ * to break out of the tabpage loop.
+ */
 # define FOR_ALL_TAB_WINDOWS(tp, wp) \
     for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
 	for ((wp) = ((tp) == curtab) \