0
0
mirror of https://github.com/vim/vim.git synced 2025-10-07 05:54: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:
Bram Moolenaar
2016-07-24 22:04:11 +02:00
parent 6835dc61ae
commit 2932359000
33 changed files with 148 additions and 142 deletions

View File

@@ -796,7 +796,7 @@ mf_release(memfile_T *mfp, int page_count)
if (mfp->mf_fd < 0 && need_release && p_uc)
{
/* find for which buffer this memfile is */
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
FOR_ALL_BUFFERS(buf)
if (buf->b_ml.ml_mfp == mfp)
break;
if (buf != NULL && buf->b_may_swap)
@@ -861,7 +861,7 @@ mf_release_all(void)
bhdr_T *hp;
int retval = FALSE;
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
FOR_ALL_BUFFERS(buf)
{
mfp = buf->b_ml.ml_mfp;
if (mfp != NULL)