summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/fileio.c b/src/fileio.c
index ea01b763f..c4066173d 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -6088,7 +6088,7 @@ shorten_fnames(int force)
char_u *p;
mch_dirname(dirname, MAXPATHL);
- for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+ FOR_ALL_BUFFERS(buf)
{
if (buf->b_fname != NULL
#ifdef FEAT_QUICKFIX
@@ -6680,7 +6680,7 @@ check_timestamps(
++no_wait_return;
did_check_timestamps = TRUE;
already_warned = FALSE;
- for (buf = firstbuf; buf != NULL; )
+ FOR_ALL_BUFFERS(buf)
{
/* Only check buffers in a window. */
if (buf->b_nwindows > 0)
@@ -6699,7 +6699,6 @@ check_timestamps(
continue;
}
}
- buf = buf->b_next;
}
--no_wait_return;
need_check_timestamps = FALSE;
@@ -8759,7 +8758,7 @@ ex_doautoall(exarg_T *eap)
* gives problems when the autocommands make changes to the list of
* buffers or windows...
*/
- for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+ FOR_ALL_BUFFERS(buf)
{
if (buf->b_ml.ml_mfp != NULL)
{
@@ -8831,7 +8830,7 @@ aucmd_prepbuf(
win = curwin;
else
#ifdef FEAT_WINDOWS
- for (win = firstwin; win != NULL; win = win->w_next)
+ FOR_ALL_WINDOWS(win)
if (win->w_buffer == buf)
break;
#else