fix(terminal): keep the terminal from sliding sideways while composing (#4347)

A TUI that leaves the cursor in the last column pushed xterm's input textarea and IME composition past the right edge, and Chromium (WebView2) scrolled the clipping pane to keep the caret visible. The xterm element now clips its overflow, so no ancestor can scroll.
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-18 23:02:51 +08:00
1 джерело 6d788cb6f8
коміт 2321929709
1 file changed
+8
+8
Переглянути файл
@@ -7,6 +7,14 @@
white-space: pre;
}
/* xterm places its input textarea and IME composition at the cursor. A program that leaves the
cursor in the last column (pi, other TUIs drawing their own cursor) pushes them past the edge,
and Chromium (WebView2) then scrolls the clipping pane to keep the caret in view: the whole
terminal slides sideways while composing. `clip` keeps that overflow out of every ancestor. */
.xterm {
overflow: clip;
}
/* An icon or fallback symbol wider than its cell stays over the next cell's background
(domRowCache), while selected spans keep xterm's `.xterm-decoration-top` z-index (2). */
.xterm .xterm-rows .openidea-terminal-icon:not(.xterm-decoration-top) {