Fix scrolling issue when a floating pane overlaps a tiled pane.

This commit is contained in:
Michael Grant
2026-03-17 17:08:02 +00:00
parent c42a939e98
commit ab0081294c

View File

@@ -2747,8 +2747,9 @@ server_client_loop(void)
{ {
struct client *c; struct client *c;
struct window *w; struct window *w;
struct window_pane *wp; struct window_pane *wp, *twp;
struct window_mode_entry *wme; struct window_mode_entry *wme;
u_int bit;
/* Check for window resize. This is done before redrawing. */ /* Check for window resize. This is done before redrawing. */
RB_FOREACH(w, windows, &windows) RB_FOREACH(w, windows, &windows)
@@ -2786,6 +2787,42 @@ server_client_loop(void)
server_client_check_pane_resize(wp); server_client_check_pane_resize(wp);
server_client_check_pane_buffer(wp); server_client_check_pane_buffer(wp);
} }
/*
* If PANE_REDRAW was set during buffer processing
* above, check_redraw has already run for this
* iteration and will not see it. Defer the redraw
* to the next iteration via CLIENT_REDRAWPANES so
* screen_redraw_pane fires once the grid is complete
* (e.g. after the shell prompt has been written).
*/
if (wp->flags & PANE_REDRAW) {
bit = 0;
TAILQ_FOREACH(twp, &w->panes, entry) {
if (twp == wp) {
TAILQ_FOREACH(c, &clients,
entry) {
if (c->session == NULL ||
c->session->curw ==
NULL ||
c->session->curw->window
!= w)
continue;
if (bit < 64) {
c->redraw_panes
|= (1ULL
<< bit);
c->flags |=
CLIENT_REDRAWPANES;
} else
c->flags |=
CLIENT_REDRAWWINDOW;
}
break;
}
if (++bit == 64)
break;
}
}
wp->flags &= ~(PANE_REDRAW|PANE_REDRAWSCROLLBAR); wp->flags &= ~(PANE_REDRAW|PANE_REDRAWSCROLLBAR);
} }
check_window_name(w); check_window_name(w);