diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-07-12 23:24:28 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-07-15 23:07:29 -0400 |
commit | e95945a1574327a025334c7ed285741ebdff4cd4 (patch) | |
tree | 56d9f1ebb27e2e89884175b9c52a41b423510da2 /src/nvim/globals.h | |
parent | 1c2cfdba88ce3a83807c3c38909c0ee6b3ec2df0 (diff) | |
download | rneovim-e95945a1574327a025334c7ed285741ebdff4cd4.tar.gz rneovim-e95945a1574327a025334c7ed285741ebdff4cd4.tar.bz2 rneovim-e95945a1574327a025334c7ed285741ebdff4cd4.zip |
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)
https://github.com/vim/vim/commit/3d1491ed2394b3e92902102879bace28a5f9c201
Diffstat (limited to 'src/nvim/globals.h')
-rw-r--r-- | src/nvim/globals.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/globals.h b/src/nvim/globals.h index 139ffe2144..1cb2f4592a 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -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) |