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 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 22:08:57 +02:00
parent 263bcf36b7
commit 3c913fefd3

View File

@@ -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);
// 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());
} else {
gc.clearRect(x, 0.0, width, canvas.getHeight());
}
if (startColumn == 0) {
gc.setFill(rowEdgeBackground(row, true));
gc.fillRect(0.0, 0.0, TerminalMetrics.PADDING, canvas.getHeight());