aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds2.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-09-22 13:38:58 -0400
committerJustin M. Keyes <justinkz@gmail.com>2014-09-22 13:38:58 -0400
commit1c84a0e09093d728408024a6baa9967df596be54 (patch)
tree3038828072136affc9de36257ac49ba069ede25b /src/nvim/ex_cmds2.c
parenta4b9e0df67ae95777f8f7d833e7d4c6b8fc3840c (diff)
parent22bd722c011b04a5fff3182c370c877d82e0fbe0 (diff)
downloadrneovim-1c84a0e09093d728408024a6baa9967df596be54.tar.gz
rneovim-1c84a0e09093d728408024a6baa9967df596be54.tar.bz2
rneovim-1c84a0e09093d728408024a6baa9967df596be54.zip
Merge pull request #1108 from war1025/dev/for_all_tabs
FOR_ALL_TAB_WINDOWS cleanup. Add FOR_ALL_TABS and FOR_ALL_WINDOWS_IN_TAB.
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r--src/nvim/ex_cmds2.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index c3d34e9991..0703c76b8a 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -1204,7 +1204,6 @@ check_changed_any (
int bufnum = 0;
int bufcount = 0;
int *bufnrs;
- tabpage_T *tp;
FOR_ALL_BUFFERS(buf) {
++bufcount;
@@ -1225,9 +1224,9 @@ check_changed_any (
}
/* buf in other tab */
- for (tp = first_tabpage; tp != NULL; tp = tp->tp_next) {
+ FOR_ALL_TABS(tp) {
if (tp != curtab) {
- for (win_T *wp = tp->tp_firstwin; wp != NULL; wp = wp->w_next) {
+ FOR_ALL_WINDOWS_IN_TAB(wp, tp) {
add_bufnum(bufnrs, &bufnum, wp->w_buffer->b_fnum);
}
}
@@ -1282,7 +1281,6 @@ check_changed_any (
/* Try to find a window that contains the buffer. */
if (buf != curbuf) {
- win_T *wp;
FOR_ALL_TAB_WINDOWS(tp, wp) {
if (wp->w_buffer == buf) {
goto_tabpage_win(tp, wp);
@@ -1510,12 +1508,11 @@ do_arglist (
*/
static void alist_check_arg_idx(void)
{
- win_T *win;
- tabpage_T *tp;
-
- FOR_ALL_TAB_WINDOWS(tp, win)
- if (win->w_alist == curwin->w_alist)
- check_arg_idx(win);
+ FOR_ALL_TAB_WINDOWS(tp, win) {
+ if (win->w_alist == curwin->w_alist) {
+ check_arg_idx(win);
+ }
+ }
}
/*