pub fn segments_layout(
pattern: &ParsedPattern,
) -> Vec<(usize, usize, SegmentKind)>Expand description
One editable segment’s span in formatted-text display coordinates.
(start_char_offset, end_char_offset_exclusive, kind). Computed by
walking ParsedPattern::tokens and accumulating the rendered
width of each segment (4 for Year, 2 for Period (AM/PM),
2 for every digit segment) and each literal. Drives caret-in-
segment lookups for segment-stepping and per-segment selection.