vim-patch:8.1.0623: iterating through window frames is repeated

Problem:    Iterating through window frames is repeated.
Solution:   Define FOR_ALL_FRAMES. (Yegappan Lakshmanan)
3d1491ed23
This commit is contained in:
Jan Edmund Lazo
2019-07-12 23:24:28 -04:00
parent 1c2cfdba88
commit e95945a157
4 changed files with 120 additions and 92 deletions

View File

@@ -4571,17 +4571,21 @@ void redraw_statuslines(void)
/*
* Redraw all status lines at the bottom of frame "frp".
*/
void win_redraw_last_status(frame_T *frp)
void win_redraw_last_status(const frame_T *frp)
FUNC_ATTR_NONNULL_ARG(1)
{
if (frp->fr_layout == FR_LEAF)
frp->fr_win->w_redr_status = TRUE;
else if (frp->fr_layout == FR_ROW) {
for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
if (frp->fr_layout == FR_LEAF) {
frp->fr_win->w_redr_status = true;
} else if (frp->fr_layout == FR_ROW) {
FOR_ALL_FRAMES(frp, frp->fr_child) {
win_redraw_last_status(frp);
} else { /* frp->fr_layout == FR_COL */
}
} else {
assert(frp->fr_layout == FR_COL);
frp = frp->fr_child;
while (frp->fr_next != NULL)
while (frp->fr_next != NULL) {
frp = frp->fr_next;
}
win_redraw_last_status(frp);
}
}