diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-24 22:04:11 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-24 22:04:11 +0200 |
commit | 2932359000b2f918d5fade79ea4d124d5943cd07 (patch) | |
tree | 1ca4fa98569a4d20ce066c7d6254404bcf431b47 /src/gui_mac.c | |
parent | 6835dc61aebca2b602d85a9d63c449ace58683b4 (diff) | |
download | vim-git-2932359000b2f918d5fade79ea4d124d5943cd07.tar.gz |
patch 7.4.2101v7.4.2101
Problem: Looping over windows, buffers and tab pages is inconsistant.
Solution: Use FOR_ALL_ macros everywhere. (Yegappan Lakshmanan)
Diffstat (limited to 'src/gui_mac.c')
-rw-r--r-- | src/gui_mac.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui_mac.c b/src/gui_mac.c index b2e4d4b3f..b78c903be 100644 --- a/src/gui_mac.c +++ b/src/gui_mac.c @@ -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; } |