aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r--src/nvim/ex_cmds2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index c3d34e9991..37d59b8fcf 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,7 +1224,7 @@ 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) {
add_bufnum(bufnrs, &bufnum, wp->w_buffer->b_fnum);
@@ -1283,6 +1282,7 @@ check_changed_any (
/* Try to find a window that contains the buffer. */
if (buf != curbuf) {
win_T *wp;
+ tabpage_T *tp;
FOR_ALL_TAB_WINDOWS(tp, wp) {
if (wp->w_buffer == buf) {
goto_tabpage_win(tp, wp);