diff options
Diffstat (limited to 'src/nvim/globals.h')
-rw-r--r-- | src/nvim/globals.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/globals.h b/src/nvim/globals.h index a7aaf6429c..376bd02396 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -525,9 +525,12 @@ EXTERN win_T *prevwin INIT(= NULL); /* previous window */ * 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) \ - ? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next) + FOR_ALL_TABS(tp) \ + FOR_ALL_WINDOWS_IN_TAB(wp, tp) + +# define FOR_ALL_WINDOWS_IN_TAB(wp, tp) \ + for (win_T *wp = ((tp) == curtab) \ + ? firstwin : (tp)->tp_firstwin; wp != NULL; wp = wp->w_next) EXTERN win_T *curwin; /* currently active window */ |