mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 09:26:30 +00:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user