summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-24 22:04:11 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-24 22:04:11 +0200
commit2932359000b2f918d5fade79ea4d124d5943cd07 (patch)
tree1ca4fa98569a4d20ce066c7d6254404bcf431b47 /src/screen.c
parent6835dc61aebca2b602d85a9d63c449ace58683b4 (diff)
downloadvim-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/screen.c')
-rw-r--r--src/screen.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/screen.c b/src/screen.c
index ccdf98c58..1b364a4a2 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -730,7 +730,7 @@ update_screen(int type)
#ifdef FEAT_WINDOWS
/* Reset b_mod_set flags. Going through all windows is probably faster
* than going through all buffers (there could be many buffers). */
- for (wp = firstwin; wp != NULL; wp = wp->w_next)
+ FOR_ALL_WINDOWS(wp)
wp->w_buffer->b_mod_set = FALSE;
#else
curbuf->b_mod_set = FALSE;
@@ -962,7 +962,7 @@ update_debug_sign(buf_T *buf, linenr_T lnum)
update_prepare();
# ifdef FEAT_WINDOWS
- for (wp = firstwin; wp; wp = wp->w_next)
+ FOR_ALL_WINDOWS(wp)
{
if (wp->w_redr_type != 0)
win_update(wp);
@@ -6271,7 +6271,7 @@ status_redraw_all(void)
{
win_T *wp;
- for (wp = firstwin; wp; wp = wp->w_next)
+ FOR_ALL_WINDOWS(wp)
if (wp->w_status_height)
{
wp->w_redr_status = TRUE;
@@ -6287,7 +6287,7 @@ status_redraw_curbuf(void)
{
win_T *wp;
- for (wp = firstwin; wp; wp = wp->w_next)
+ FOR_ALL_WINDOWS(wp)
if (wp->w_status_height != 0 && wp->w_buffer == curbuf)
{
wp->w_redr_status = TRUE;
@@ -6303,7 +6303,7 @@ redraw_statuslines(void)
{
win_T *wp;
- for (wp = firstwin; wp; wp = wp->w_next)
+ FOR_ALL_WINDOWS(wp)
if (wp->w_redr_status)
win_redr_status(wp);
if (redraw_tabline)
@@ -10360,7 +10360,7 @@ draw_tabline(void)
else
#endif
{
- for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
+ FOR_ALL_TABPAGES(tp)
++tabcount;
tabwidth = (Columns - 1 + tabcount / 2) / tabcount;