0
0
mirror of https://github.com/vim/vim.git synced 2025-11-15 23:14:06 -05: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

@@ -633,7 +633,7 @@ Handle_KAHL_SRCH_AE(
if (error)
return error;
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
FOR_ALL_BUFFERS(buf)
if (buf->b_ml.ml_mfp != NULL
&& SearchData.theFile.parID == buf->b_FSSpec.parID
&& SearchData.theFile.name[0] == buf->b_FSSpec.name[0]
@@ -725,7 +725,7 @@ Handle_KAHL_MOD_AE(
#endif
numFiles = 0;
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
FOR_ALL_BUFFERS(buf)
if (buf->b_ml.ml_mfp != NULL)
{
/* Add this file to the list */
@@ -807,7 +807,7 @@ Handle_KAHL_GTTX_AE(
if (error)
return error;
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
FOR_ALL_BUFFERS(buf)
if (buf->b_ml.ml_mfp != NULL)
if (GetTextData.theFile.parID == buf->b_FSSpec.parID)
{
@@ -6422,7 +6422,7 @@ getTabCount(void)
tabpage_T *tp;
int numTabs = 0;
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
FOR_ALL_TABPAGES(tp)
++numTabs;
return numTabs;
}