From 6a7cd79a63ab45bb99887615fe9f820d21bf6c42 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 5 Jan 2026 08:32:19 +0000 Subject: [PATCH] Redraw pane borders when entering or leaving alternate screen, from Mike Jonkmans in GitHub issue 4788. --- screen-write.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/screen-write.c b/screen-write.c index aed6582f..4f126868 100644 --- a/screen-write.c +++ b/screen-write.c @@ -2282,8 +2282,10 @@ screen_write_alternateon(struct screen_write_ctx *ctx, struct grid_cell *gc, screen_write_collect_flush(ctx, 0, __func__); screen_alternate_on(ctx->s, gc, cursor); - if (wp != NULL) + if (wp != NULL) { layout_fix_panes(wp->window, NULL); + server_redraw_window_borders(wp->window); + } screen_write_initctx(ctx, &ttyctx, 1); if (ttyctx.redraw_cb != NULL) @@ -2304,8 +2306,10 @@ screen_write_alternateoff(struct screen_write_ctx *ctx, struct grid_cell *gc, screen_write_collect_flush(ctx, 0, __func__); screen_alternate_off(ctx->s, gc, cursor); - if (wp != NULL) + if (wp != NULL) { layout_fix_panes(wp->window, NULL); + server_redraw_window_borders(wp->window); + } screen_write_initctx(ctx, &ttyctx, 1); if (ttyctx.redraw_cb != NULL)