mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 19:48:32 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user