logs.gokuls.in

1 pull request merged across 1 repo

bahdotsh/giff

  • Long file paths in the file list panel were pushing +N -N change stats off-screen, making them invisible
  • Truncate paths with an ellipsis () to guarantee the stats suffix always fits within the panel width
  • Uses char-boundary-safe slicing to avoid panics on non-ASCII paths, and a digit_count helper to measure stat widths without per-frame allocations

Test plan

  • cargo build passes
  • cargo test passes (71 tests)
  • Manually verify with a repo containing long file paths — stats should remain visible
  • Verify with a narrow terminal window — graceful degradation