Skip to content

Commit 6b2fc55

Browse files
committed
fix(terminals): render readonly session output without a staircase
Readonly sessions aggregated from other devframes via the hub stream their raw output straight to the client, so bare LF line endings never get the server-side CRLF normalization that own pipe sessions receive — xterm then left the cursor column untouched on each newline and rendered a staircase. Enable xterm's convertEol for readonly sessions so a lone LF is treated as CRLF (a no-op when CRLF already arrived); interactive PTY sessions keep it off so full-screen TUIs retain exact cursor control.
1 parent 1201a14 commit 6b2fc55

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

plugins/terminals/src/client/TerminalView.svelte

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@
5959
scrollback: 10000,
6060
theme: isDark ? DARK_THEME : LIGHT_THEME,
6161
disableStdin: info.mode !== 'interactive',
62+
// Readonly sessions are line-oriented log streams. Own pipe sessions get
63+
// their bare `\n` normalized to `\r\n` server-side, but sessions
64+
// aggregated from other devframes via the hub stream their raw output
65+
// here unfiltered — a lone `\n` would then leave the cursor's column
66+
// untouched and render a staircase. `convertEol` makes xterm treat `\n`
67+
// as `\r\n`, fixing both (a no-op where CRLF already arrived). Interactive
68+
// PTY sessions keep it off so full-screen TUIs control the cursor exactly.
69+
convertEol: info.mode !== 'interactive',
6270
allowProposedApi: false,
6371
})
6472

0 commit comments

Comments
 (0)