diff options
author | James McCoy <jamessan@jamessan.com> | 2017-03-10 16:13:37 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-03-11 20:32:09 -0500 |
commit | 564e9dc17fd53ab6cb1bc63a55dba2df9538a31f (patch) | |
tree | 40c382cf733ab05a3d6c51dd684253ddce7b2cf9 /src/nvim/normal.c | |
parent | 5674057e3a5597f792a077d714bd7d32af81bfc8 (diff) | |
download | rneovim-564e9dc17fd53ab6cb1bc63a55dba2df9538a31f.tar.gz rneovim-564e9dc17fd53ab6cb1bc63a55dba2df9538a31f.tar.bz2 rneovim-564e9dc17fd53ab6cb1bc63a55dba2df9538a31f.zip |
vim-patch:7.4.2101
Problem: Looping over windows, buffers and tab pages is inconsistant.
Solution: Use FOR_ALL_ macros everywhere. (Yegappan Lakshmanan)
https://github.com/vim/vim/commit/2932359000b2f918d5fade79ea4d124d5943cd07
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 38507486fd..ee3c3f9f11 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -3512,7 +3512,8 @@ void check_scrollbind(linenr_T topline_diff, long leftcol_diff) * loop through the scrollbound windows and scroll accordingly */ VIsual_select = VIsual_active = 0; - for (curwin = firstwin; curwin; curwin = curwin->w_next) { + FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { + curwin = wp; curbuf = curwin->w_buffer; /* skip original window and windows with 'noscrollbind' */ if (curwin == old_curwin || !curwin->w_p_scb) { |