vim-patch:8.1.0623: iterating through window frames is repeated

Problem:    Iterating through window frames is repeated.
Solution:   Define FOR_ALL_FRAMES. (Yegappan Lakshmanan)
3d1491ed23
This commit is contained in:
Jan Edmund Lazo
2019-07-12 23:24:28 -04:00
parent 1c2cfdba88
commit e95945a157
4 changed files with 120 additions and 92 deletions

View File

@@ -435,10 +435,11 @@ 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)
/*
* When using this macro "break" only breaks out of the inner loop. Use "goto"
* to break out of the tabpage loop.
*/
# define FOR_ALL_FRAMES(frp, first_frame) \
for (frp = first_frame; frp != NULL; frp = frp->fr_next) // NOLINT
// 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_ALL_TABS(tp) \
FOR_ALL_WINDOWS_IN_TAB(wp, tp)