diff options
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index ec347c1124..ae17038cce 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -1439,7 +1439,7 @@ find_buffer(typval_T *avar) { /* No full path name match, try a match with a URL or a "nofile" * buffer, these don't use the full path. */ - for (buf = firstbuf; buf != NULL; buf = buf->b_next) + FOR_ALL_BUFFERS(buf) if (buf->b_fname != NULL && (path_with_url(buf->b_fname) #ifdef FEAT_QUICKFIX @@ -1597,7 +1597,7 @@ buf_win_common(typval_T *argvars, typval_T *rettv, int get_nr) ++emsg_off; buf = get_buf_tv(&argvars[0], TRUE); #ifdef FEAT_WINDOWS - for (wp = firstwin; wp; wp = wp->w_next) + FOR_ALL_WINDOWS(wp) { ++winnr; if (wp->w_buffer == buf) @@ -6383,7 +6383,7 @@ f_last_buffer_nr(typval_T *argvars UNUSED, typval_T *rettv) int n = 0; buf_T *buf; - for (buf = firstbuf; buf != NULL; buf = buf->b_next) + FOR_ALL_BUFFERS(buf) if (n < buf->b_fnum) n = buf->b_fnum; @@ -12373,7 +12373,7 @@ f_winrestcmd(typval_T *argvars UNUSED, typval_T *rettv) char_u buf[50]; ga_init2(&ga, (int)sizeof(char), 70); - for (wp = firstwin; wp != NULL; wp = wp->w_next) + FOR_ALL_WINDOWS(wp) { sprintf((char *)buf, "%dresize %d|", winnr, wp->w_height); ga_concat(&ga, buf); |