FAILURE MAP
← Case archive

FA-80660 / Bidirectional text layout / Member archive

Caret visual position: line start caret · case 05

A caret at offset 0 with backward affinity lands at the end of the line.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

Input [levels, logical caret offset k, affinity]. Characters are one unit wide and visually ordered by level reversal. Affinity "after" attaches the caret to the leading edge of character k (if k < n), otherwise to the trailing edge of character k-1; offset 0 always uses the leading edge of character 0. The leading edge of an LTR character is its left side, of an RTL (odd) character its right side. Return the visual x.

Why this case matters

Mixed right-to-left and left-to-right text must resolve levels and visual order exactly, or words, numbers and carets land in the wrong place.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: line start caret01Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗