7f1f320438b02463a15e69933da2904d401da178
When rendering a side-by-side diff, `SourceDimensions::new` could compute a per-column content width that was not greater than the tab width. That violates the precondition of `split_and_apply`, which asserts `max_len > tab_width` so it can always fit at least one expanded tab and make progress when wrapping. As a result difftastic aborted with a panic on ordinary input, for example `difft --width 14 a b` or, even at the default terminal width, `difft --tab-width 100 a b`. A very small `--width` could also drive the total display width down to two columns or fewer, underflowing the `display_width - SPACER.len()` subtraction (previously guarded by an assertion that itself aborted). Enforce both invariants in `SourceDimensions::new`: keep room for the column spacer, and ensure each content column is wider than the tab width. Narrow terminals now degrade gracefully instead of crashing.
Languages
Rust
100%