Thing 2.0: cells text (terminal widths and line breaking behind Measure) #23
Loading…
Reference in a new issue
No description provided.
Delete branch "hands/thing2-cells-text"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
thing_core::text gains CellText and CellMeasure behind the Measure trait (
thing2:ruling:cells-text-cut-before-tui): text is sanitized first (every C0/C1 control, ESC, DEL and bidi control removed, so a document cannot write escape codes or reorder a terminal), then segmented into grapheme clusters and measured (unicode-width 0.2.3, ambiguous narrow), so each recorded width is the width of exactly the emitted text; UAX #14 line breaking (unicode-linebreak); tab stops from the wrapped line start. Width vectors pin CJK, combining marks, emoji presentation and ZWJ sequences; a property test re-measures every emitted line over a 400,000-round fuzz; output is identical on Windows and Linux. New thing-core deps: unicode-width, unicode-segmentation, unicode-linebreak.Spec
thing2:cut_spec:cut-cells-text.r1; reports h1, h2; Soul s1, s2 (s2 holds). 249 tests; 20/20 mutants. No golden moved.🤖 Generated with Claude Code