Expand description
ANSI-aware text wrapping and width measurement.
Structs§
- Active
Hyperlink - An active OSC 8 hyperlink tracked by
AnsiCodeTracker. - Ansi
Code Tracker - Tracks active ANSI SGR and OSC 8 state across line breaks.
Functions§
- byte_
index_ at_ visual_ pos - Return the byte index in
sthat corresponds to visual positiontarget_pos. - truncate_
to_ width - Truncate a string so its visible width does not exceed
max_width. - visible_
width - Compute the visible display width of a string.
- wrap_
text_ with_ ansi - Wrap text into lines that fit within
widthcolumns, preserving ANSI codes.