1
0
mirror of https://github.com/sharkdp/bat synced 2026-06-25 12:43:17 +00:00
Commit Graph

5 Commits

Author SHA1 Message Date
Eyüp Can Akman fc94a0ec49 fix: account for caret notation width in text wrapping
Control characters displayed in caret notation (e.g. ^@ for NUL)
occupy 2 terminal columns, but the width calculation treated them
as 0-width. Add a char_width() helper that returns 2 for control
characters, fixing incorrect line wrapping with --binary=as-text.

Fixes #3631
2026-03-20 22:28:39 +02:00
Ethan P 3d04699710 Add regression test for #2541
More specifically, the test ensures that OSC sequences don't end up
wrapping the line.
2024-02-09 22:09:39 -08:00
Martin Nordholts 9ed9a6fc3d Simplify HighlightingAssets::get_syntax() first_line logic (#1852)
And make self.get_first_line_syntax() be called lazily.
2021-09-16 17:01:12 +02:00
Ethan P 82981c9663 Add regression test for detected syntax differing for stdin and files 2020-05-13 02:53:19 -07:00
sharkdp 03c2281828 Add do-not-panic! regression tests 2020-04-21 11:50:26 +02:00