From 3c913fefd3ed2ba8f8a6619f28bf91e3b3c6a3ef Mon Sep 17 00:00:00 2001 From: Gregor Lohaus Date: Sun, 31 May 2026 22:08:57 +0200 Subject: [PATCH] fix black seam bars: opaque base fill instead of clearRect The persistent black bars in the partial-repaint path were clearRect leaving the run's fractional edge pixels transparent, which showed the near-black pane background as a seam against the adjacent un-repainted line. Confirmed with the debugRepaint toggle: filling the span opaque removed the bars entirely. Fill the repaint run with PANE_BACKGROUND (the default cell background) instead of clearing to transparent; per-cell backgrounds paint over it as before. Safe because the per-column path never runs while kitty graphics are present (those force a full render), so no below-text image needs a transparent row canvas. Co-Authored-By: Claude Opus 4.8 --- .../com/gregor/jprototerm/TerminalPaneNode.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gregor/jprototerm/TerminalPaneNode.java b/src/main/java/com/gregor/jprototerm/TerminalPaneNode.java index 91f0743..3adc57f 100644 --- a/src/main/java/com/gregor/jprototerm/TerminalPaneNode.java +++ b/src/main/java/com/gregor/jprototerm/TerminalPaneNode.java @@ -846,12 +846,15 @@ final class TerminalPaneNode extends Region { double x = TerminalMetrics.PADDING + startColumn * cellWidth; double width = (endColumn - startColumn + 1) * cellWidth; - if (DEBUG_REPAINT) { - gc.setFill(Color.RED); - gc.fillRect(x, 0.0, width, canvas.getHeight()); - } else { - gc.clearRect(x, 0.0, width, canvas.getHeight()); - } + // Opaque base fill rather than clearRect: a transparent clear leaves the run's + // fractional edge pixels transparent, which show the near-black pane background + // as a thin seam bar against the adjacent (un-repainted) line. Filling opaque + // removes every transparent pixel; per-cell backgrounds then paint on top, and + // default-background cells correctly show PANE_BACKGROUND. Safe because the + // per-column path never runs while kitty graphics (which need a transparent row + // canvas for below-text images) are present. + gc.setFill(DEBUG_REPAINT ? Color.RED : PANE_BACKGROUND); + gc.fillRect(x, 0.0, width, canvas.getHeight()); if (startColumn == 0) { gc.setFill(rowEdgeBackground(row, true)); gc.fillRect(0.0, 0.0, TerminalMetrics.PADDING, canvas.getHeight());