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/misc1.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/misc1.c')
-rw-r--r-- | src/misc1.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/misc1.c b/src/misc1.c index 293ac9e93..2ee87b1f2 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -2814,7 +2814,7 @@ changed_bytes(linenr_T lnum, colnr_T col) win_T *wp; linenr_T wlnum; - for (wp = firstwin; wp != NULL; wp = wp->w_next) + FOR_ALL_WINDOWS(wp) if (wp->w_p_diff && wp != curwin) { redraw_win_later(wp, VALID); @@ -2924,7 +2924,7 @@ changed_lines( win_T *wp; linenr_T wlnum; - for (wp = firstwin; wp != NULL; wp = wp->w_next) + FOR_ALL_WINDOWS(wp) if (wp->w_p_diff && wp != curwin) { redraw_win_later(wp, VALID); @@ -3213,7 +3213,7 @@ check_status(buf_T *buf) { win_T *wp; - for (wp = firstwin; wp != NULL; wp = wp->w_next) + FOR_ALL_WINDOWS(wp) if (wp->w_buffer == buf && wp->w_status_height) { wp->w_redr_status = TRUE; @@ -9475,7 +9475,7 @@ preserve_exit(void) ml_close_notmod(); /* close all not-modified buffers */ - for (buf = firstbuf; buf != NULL; buf = buf->b_next) + FOR_ALL_BUFFERS(buf) { if (buf->b_ml.ml_mfp != NULL && buf->b_ml.ml_mfp->mf_fname != NULL) { |