Fix active border colour if only floating panes in the window.

This commit is contained in:
Michael Grant 2025-10-27 23:35:53 +00:00
parent 28d038fb16
commit 0cd3ab6299

View File

@ -371,6 +371,7 @@ screen_redraw_check_cell(struct screen_redraw_ctx *ctx, u_int px, u_int py,
if (!window_pane_visible(wp)) if (!window_pane_visible(wp))
goto next1; goto next1;
/* xxxx Isn't this only true if pane at the top of the window? */
if (pane_status == PANE_STATUS_TOP) if (pane_status == PANE_STATUS_TOP)
line = wp->yoff - 1; line = wp->yoff - 1;
else else
@ -419,8 +420,7 @@ screen_redraw_check_cell(struct screen_redraw_ctx *ctx, u_int px, u_int py,
*/ */
sb_w = wp->scrollbar_style.width + sb_w = wp->scrollbar_style.width +
wp->scrollbar_style.pad; wp->scrollbar_style.pad;
if ((pane_status && py != line) || if ((wp->yoff == 0 && py < wp->sy) ||
(wp->yoff == 0 && py < wp->sy) ||
(py >= wp->yoff && py < wp->yoff + wp->sy)) { (py >= wp->yoff && py < wp->yoff + wp->sy)) {
/* Check if px lies within a scrollbar. */ /* Check if px lies within a scrollbar. */
if ((sb_pos == PANE_SCROLLBARS_RIGHT && if ((sb_pos == PANE_SCROLLBARS_RIGHT &&
@ -792,7 +792,7 @@ screen_redraw_draw_borders_cell(struct screen_redraw_ctx *ctx, u_int i, u_int j)
if (cell_type == CELL_INSIDE || cell_type == CELL_SCROLLBAR) if (cell_type == CELL_INSIDE || cell_type == CELL_SCROLLBAR)
return; return;
if (wp == NULL) { if (wp == NULL || cell_type == CELL_OUTSIDE) {
if (!ctx->no_pane_gc_set) { if (!ctx->no_pane_gc_set) {
ft = format_create_defaults(NULL, c, s, s->curw, NULL); ft = format_create_defaults(NULL, c, s, s->curw, NULL);
memcpy(&ctx->no_pane_gc, &grid_default_cell, sizeof gc); memcpy(&ctx->no_pane_gc, &grid_default_cell, sizeof gc);