Skip to content

Commit f433990

Browse files
ttak0422claude
andauthored
fix: update vt100 0.15 → 0.16 to restore dim (SGR 2) attribute in snapshots (#16)
vt100 0.15 did not track the dim/faint attribute (SGR 2) at all — no TEXT_MODE_DIM bit and no handler in sgr(). As a result, state_formatted() never re-emitted ESC[2m, so text rendered as dim in the live session would appear as normal-weight text after a detach/re-attach cycle. vt100 0.16 adds TEXT_MODE_DIM and handles SGR 2 → set_dim(), and state_formatted() correctly re-emits Intensity::Dim as ESC[2m. Confirmed via byte-level comparison of live PTY output vs snapshot: ORIGINAL: ESC[2mNo ESC[0m (faint) 0.15 snap: ESC[m No (dim lost) 0.16 snap: ESC[m ESC[2mNo (dim preserved) API changes in 0.16: - screen.errors() removed → dropped from debug log format string - parser.set_size(rows, cols) → parser.screen_mut().set_size(rows, cols) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4c69a43 commit f433990

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

Cargo.lock

Lines changed: 7 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ log = "0.4"
1616
env_logger = "0.11"
1717
serde = { version = "1", features = ["derive"] }
1818
serde_json = "1"
19-
vt100 = "0.15"
19+
vt100 = "0.16"
2020

2121
[workspace]
2222
members = ["proto"]

src/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl Session {
6464
/// Resize the pty and VT parser.
6565
pub fn resize(&mut self, cols: u16, rows: u16) -> io::Result<()> {
6666
self.pty.resize(cols, rows)?;
67-
self.parser.set_size(rows, cols);
67+
self.parser.screen_mut().set_size(rows, cols);
6868
Ok(())
6969
}
7070

0 commit comments

Comments
 (0)