mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 00:02:23 +00:00
Whatever runs in a pane sets this, and `OscTokenizer` ends an OSC only on
BEL or ESC -- every other byte is payload, newlines included. `parse_osc_title`
then trimmed the ends and kept the middle, so `printf '\033]2;a\nb\007'`
produced a title carrying a newline.
That title is drawn as a tab label and written into the machine file, and
this tree already knows what a newline does to a label: "gpui breaks text on
`\n` whatever `white_space` says, so an entry carrying one paints its tail
over whatever sits below it" -- the reason history rows are folded through
`one_line_char` before they are drawn. A tab label had no such step, and
unlike a history row the string survives a restart.
Folded at the one place a title enters, so the record on disk is one line
too, rather than at each of the places that draw one. Character for
character, so the length cap still counts what the user will see, and
trimmed afterwards since folding can blank the edges.
Verified the test earns its keep: without the fold it fails with
`left: Some("first\nsecond")`.