mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-26 20:16:33 +00:00
The `Attributes` ANSI style tracker in `src/vscreen.rs` declares, initializes, clears (in `sgr_reset`), and re-emits (in `Display`) a `strike` field documented as `ON: ^[9m / OFF: ^[29m`, but `update_with_sgr()` had no match arm for SGR 9 (set strikethrough) or 29 (clear strikethrough). As a result `strike` was only ever cleared, never set. Because bat re-applies the tracked input ANSI style before each highlighted text run (nu_ansi_term appends a full reset after every token), attributes that are tracked — bold, dim, italic, underline — survive across tokens, while strikethrough was silently dropped after the first token. This path is active by default (`--strip-ansi`/`--sanitize` default to `never`). Add the missing `9` and `29` arms, mirroring the sibling underline (4/24) and italic (3/23) arms, so strikethrough is tracked and re-emitted like every other supported attribute. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>