Additional FOR_ALL_WINDOWS usage

This commit is contained in:
Wayne Rowcliffe
2014-08-20 19:39:05 -05:00
parent fe99930c46
commit ac0b9714ed
14 changed files with 123 additions and 123 deletions

View File

@@ -6177,12 +6177,17 @@ aucmd_prepbuf (
int save_acd;
/* Find a window that is for the new buffer */
if (buf == curbuf) /* be quick when buf is curbuf */
if (buf == curbuf) { /* be quick when buf is curbuf */
win = curwin;
else
for (win = firstwin; win != NULL; win = win->w_next)
if (win->w_buffer == buf)
} else {
win = NULL;
FOR_ALL_WINDOWS(wp) {
if (wp->w_buffer == buf) {
win = wp;
break;
}
}
}
/* Allocate "aucmd_win" when needed. If this fails (out of memory) fall
* back to using the current window. */