Skip to main content

Module layout

Module layout 

Source
Expand description

The layout layer (0017): one line’s byte↔display-cell maps and grapheme boundaries. Every visible-line consumer — renderer, cursor placement, selection overlays, diagnostics, mouse hit-testing — reads this instead of deriving positions by char index (the old .chars().enumerate() walk drifted after the first multibyte char).

Storage stays byte-native (ByteOffset is canonical); this is the single translation seam.

Structs§

GraphemeSpan
One grapheme cluster’s placement on the line.
LineLayout
A laid-out line: grapheme spans in order.