vim-patch:7.4.2101

Problem:    Looping over windows, buffers and tab pages is inconsistant.
Solution:   Use FOR_ALL_ macros everywhere. (Yegappan Lakshmanan)

2932359000
This commit is contained in:
James McCoy
2017-03-10 16:13:37 -05:00
parent 5674057e3a
commit 564e9dc17f
10 changed files with 51 additions and 35 deletions

View File

@@ -4365,10 +4365,15 @@ void ex_help(exarg_T *eap)
) {
if (cmdmod.tab != 0)
wp = NULL;
else
for (wp = firstwin; wp != NULL; wp = wp->w_next)
if (wp->w_buffer != NULL && wp->w_buffer->b_help)
else {
wp = NULL;
FOR_ALL_WINDOWS_IN_TAB(wp2, curtab) {
if (wp2->w_buffer != NULL && wp2->w_buffer->b_help) {
wp = wp2;
break;
}
}
}
if (wp != NULL && wp->w_buffer->b_nwindows > 0)
win_enter(wp, true);
else {