From c77d1a6de763c25f485d3bfedc6817b59a3ab5a8 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Wed, 28 Oct 2026 11:33:16 +0800 Subject: [PATCH] fix(terminal): Keep the cursor to the font height instead of the whole line With a line height above 1, xterm's DOM renderer stretched the cursor cell over the full row. Size it to the font's own height and centre it with the glyphs. --- src/features/terminal/Terminal.module.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/features/terminal/Terminal.module.css b/src/features/terminal/Terminal.module.css index 15c9bdac0..e9bc90e9c 100644 --- a/src/features/terminal/Terminal.module.css +++ b/src/features/terminal/Terminal.module.css @@ -67,6 +67,16 @@ .pane :global(.xterm) { height: 100%; } +/* xterm's DOM renderer stretches the cursor cell over the whole row (line height + included); keep it to the font's own height, centred like the glyphs. */ +.pane :global(.xterm-rows .xterm-cursor) { + position: relative; + top: 50%; + height: auto; + max-height: 100%; + line-height: normal; + transform: translateY(-50%); +} .pane :global(.xterm-viewport) { background-color: var(--bg-island, var(--bg-app)) !important; }