mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 7.4.2101
Problem: Looping over windows, buffers and tab pages is inconsistant. Solution: Use FOR_ALL_ macros everywhere. (Yegappan Lakshmanan)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user