[READ-ONLY] Mirror of https://github.com/bombshell-dev/tty. Platform independent 2D layout engine for terminal applications based on Clay
5

Configure Feed

Select the types of activity you want to include in your feed.

๐Ÿ“ spec(renderer): specify caret behavior on empty text content

Adds a normative paragraph to ยง7.6 stating that a `caret` declaration on
empty content places the cursor at the text element's origin โ€” the cell
where the first code point of `content` would be drawn if it were a
single space. Frames the empty-content case as a rendering commitment
the renderer must honor, without prescribing mechanism.

Charles Lowell (Jul 8, 2026, 2:16 PM +0300) 895565d4 9d238339

+7
+7
specs/renderer-spec.md
··· 354 354 - If `N > [...content].length` or `N < 0`, behavior is unspecified; callers must 355 355 keep offsets within bounds. 356 356 357 + When `content` is empty, the only in-range offset is `0`. In that case the 358 + caret's cell is the text element's origin โ€” the cell at which the first code 359 + point of `content` would be drawn if `content` were a single space. This is a 360 + rendering commitment implied by the presence of a `caret` declaration, and the 361 + renderer must synthesize whatever minimal geometry is required to honor it. How 362 + this outcome is achieved is implementation-defined. 363 + 357 364 Display position accounts for code points wider than one cell (CJK, fullwidth 358 365 forms, some emoji): such code points occupy two cells, and the caret sits at the 359 366 first cell of the pair. Cell widths are determined by the same measurement the