From 0f1ba9aef8da9428a842c60ab2a71513dd4fe10a Mon Sep 17 00:00:00 2001 From: Patrick Motard Date: Sat, 6 Dec 2025 15:55:52 -0600 Subject: [PATCH] Clear pane separator cells in box mode When box mode is active, the separator columns and rows between panes were not being cleared, causing old border characters to persist. Each pane's box is drawn within its allocated space, but the layout system places separator cells between panes that were left untouched. Add code to clear: - The separator column immediately to the right of each pane - The separator row immediately below each pane - The corner cell where separators intersect --- screen-redraw.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/screen-redraw.c b/screen-redraw.c index 96ecf57e..556ff54d 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -986,6 +986,37 @@ screen_redraw_draw_active_box(struct screen_redraw_ctx *ctx) tty_cell(tty, &blank_gc, &grid_default_cell, NULL, NULL); } } + + /* + * Clear separator column to the right of this pane. This is + * the column that normally holds the pane separator border. + */ + if (wp->xoff + wp->sx < w->sx) { + for (i = top; i <= bottom; i++) { + tty_cursor(tty, wp->xoff + wp->sx, tty_top + i); + tty_cell(tty, &blank_gc, &grid_default_cell, + NULL, NULL); + } + } + + /* + * Clear separator row below this pane. This is the row that + * normally holds the pane separator border. + */ + if (wp->yoff + wp->sy < w->sy) { + for (i = left; i <= right; i++) { + tty_cursor(tty, i, tty_top + wp->yoff + wp->sy); + tty_cell(tty, &blank_gc, &grid_default_cell, + NULL, NULL); + } + /* Also clear the corner where separators meet. */ + if (wp->xoff + wp->sx < w->sx) { + tty_cursor(tty, wp->xoff + wp->sx, + tty_top + wp->yoff + wp->sy); + tty_cell(tty, &blank_gc, &grid_default_cell, + NULL, NULL); + } + } } }