From 9d80e39bee680dd1a974f591f73d7c2e2bd7db7d Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Sun, 8 Nov 2026 14:11:48 -0800 Subject: [PATCH] fix(terminal): keep subpixel text on the retained replay frame (#39981) Since the xterm 6.1.0-beta.336 rows stopped clipping with overflow:hidden, Chromium draws the transparent replay copy over the opacity-0 screen with grayscale antialiasing while the live screen keeps LCD text, so glyphs shimmered for the replay hold on subpixel-AA systems. Paint the copy with the terminal's opaque background so it keeps LCD text. Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com> --- src/renderer/src/lib/pane-manager/terminal-replay-frame.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/renderer/src/lib/pane-manager/terminal-replay-frame.ts b/src/renderer/src/lib/pane-manager/terminal-replay-frame.ts index 9fd318e190d..419fbf0aed8 100644 --- a/src/renderer/src/lib/pane-manager/terminal-replay-frame.ts +++ b/src/renderer/src/lib/pane-manager/terminal-replay-frame.ts @@ -38,6 +38,12 @@ export function retainTerminalReplayFrame( overflow: 'hidden', pointerEvents: 'none' }) + // Why: Chromium drops subpixel (LCD) text for a transparent copy over the hidden screen. + const background = + screen.parentElement && getComputedStyle(screen.parentElement).backgroundColor + if (background?.startsWith('rgb(')) { + frame.style.backgroundColor = background + } for (const child of screen.children) { if (!child.matches('.xterm-helpers')) { frame.append(child.cloneNode(true))