From 0cd3ab629907f541fcadbf9f0290dedaf6b59099 Mon Sep 17 00:00:00 2001 From: Michael Grant Date: Mon, 27 Oct 2025 23:35:53 +0000 Subject: [PATCH] Fix active border colour if only floating panes in the window. --- screen-redraw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/screen-redraw.c b/screen-redraw.c index 523f5103..82e8ea7d 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -371,6 +371,7 @@ screen_redraw_check_cell(struct screen_redraw_ctx *ctx, u_int px, u_int py, if (!window_pane_visible(wp)) goto next1; + /* xxxx Isn't this only true if pane at the top of the window? */ if (pane_status == PANE_STATUS_TOP) line = wp->yoff - 1; 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 + wp->scrollbar_style.pad; - if ((pane_status && py != line) || - (wp->yoff == 0 && py < wp->sy) || + if ((wp->yoff == 0 && py < wp->sy) || (py >= wp->yoff && py < wp->yoff + wp->sy)) { /* Check if px lies within a scrollbar. */ 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) return; - if (wp == NULL) { + if (wp == NULL || cell_type == CELL_OUTSIDE) { if (!ctx->no_pane_gc_set) { ft = format_create_defaults(NULL, c, s, s->curw, NULL); memcpy(&ctx->no_pane_gc, &grid_default_cell, sizeof gc);