File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -354,6 +354,14 @@ offset `N`:
354354- If ` N > [...content].length ` or ` N < 0 ` , behavior is unspecified; callers must
355355 keep offsets within bounds.
356356
357+ When the layout engine consumes whitespace at a wrap boundary — dropping it
358+ from the rendered text so that neither wrapped line contains a display cell for
359+ those code points — the caret has no display position of its own for any offset
360+ that falls in that dropped run. In that case the caret's cell is the origin of
361+ the following wrapped line (the display position of the first code point on
362+ that line). This rule keeps the caret on-screen at the point where subsequent
363+ input will land, rather than orphaning it past the end of the previous line.
364+
357365When ` content ` is empty, the only in-range offset is ` 0 ` . In that case the
358366caret's cell is the text element's origin — the cell at which the first code
359367point of ` content ` would be drawn if ` content ` were a single space. This is a
You can’t perform that action at this time.
0 commit comments