Skip to content

Commit 26a5458

Browse files
committed
fix recording player crlf handling and theme tokens
1 parent 4bdb5db commit 26a5458

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎src/components/player/RecordingPlayer.svelte‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,8 @@
404404
405405
.screen {
406406
position: relative;
407-
background: #0f172a;
408-
color: #e2e8f0;
407+
background: var(--bg-secondary);
408+
color: var(--text-primary);
409409
border: 1px solid var(--border-primary);
410410
border-radius: var(--radius);
411411
padding: var(--space-md);

‎src/utils/cast.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,11 @@ export function eventsToLines(events) {
138138
commitSegment();
139139
pushLine(ev.t);
140140
} else if (ch === "\r") {
141-
// Carriage return: drop everything we have for this line and
142-
// let the next characters overwrite from the start. Most
143-
// "\r\n" pairs are handled because the \n hits first.
141+
// `\r\n` is the line terminator emitted by the recorded shell —
142+
// treat the pair as a single newline by letting `\n` handle it.
143+
// A bare `\r` (no following `\n`) is a carriage return that
144+
// overwrites the current line, e.g. progress bars.
145+
if (s[i + 1] === "\n") continue;
144146
commitSegment();
145147
segments.length = 0;
146148
curStart = ev.t;

0 commit comments

Comments
 (0)