diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 02:14:54 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 5492da0ba1d5f1c1cc0a880f82107961627c9ba6 (patch) | |
| tree | 0230c6b9896d773c1e93722aa944a306184dd6a2 /docs | |
| parent | 69b6d714b7fc7788a1bf1c2305262a6e861253e8 (diff) | |
| download | pardes-5492da0ba1d5f1c1cc0a880f82107961627c9ba6.tar.gz pardes-5492da0ba1d5f1c1cc0a880f82107961627c9ba6.zip | |
Addresses snap to runes, not grapheme clusters
sam and acme address runes; pardes snapped #n, line:col, dot and data's
reads to grapheme clusters, so a lone combining mark or a CRLF's \r could
not be addressed. #n, line:col, a search's match, dot (both ways) and data
now land on rune boundaries (modal.runeStart and friends), and the tty's
cell drawing is untouched. The README, fs.md and the skill say so.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/fs.md | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -493,7 +493,7 @@ out of range`. takes in `file:12:5`: `12:5` is the point at line 12, column 5, and it composes like any simple address (`12:5,14:1`, `12:5+#3`). The column is in bytes from 1, as Look's is, clamped to the end of the line and snapped -back to the start of the character it falls in; a line past the end, or +back to the start of the rune it falls in; a line past the end, or column 0, is `address out of range`. sam would read `12:5` as a syntax error. Truncating `data` or `xdata` deletes the range `addr` names and nothing @@ -646,9 +646,14 @@ action's case says where: `x`/`l` a click executed or looked at in the tag of the tag. Read `n` bytes of the text, not up to a newline -- bytes here, where acme counts runes. Every offset and count pardes serves is in bytes, `#n` and `q0`/`q1` too; the event count follows them rather than switch alone, so an acme library reads pardes -correctly for ASCII text and not beyond it. A `#n` that falls inside a -character, a multibyte rune or a grapheme cluster, snaps back to where that -character starts, and `addr` reads back the snapped offset. A click in a +correctly for ASCII text and not beyond it. Offsets are bytes, but every +address lands on a rune boundary, as sam's and acme's work in runes, never +inside a multibyte rune and never widened to a grapheme cluster: a `#n` +inside a rune snaps back to its start, a `line:col` likewise, a search's +match covers the runes it touches, and a copy of addr to dot keeps its +runes, so a lone combining mark or the `\r` of a CRLF is addressable on its +own; `addr` reads back the snapped offset. (How the terminal draws such a +text, a cluster to a cell, is apart from this.) A click in a tag gives offsets into the whole tag as `tag` reads it, the path first.) An open freezes the ring's text the way `/screen` freezes a frame: reads walk it and end. Writing `follow` to that same open makes reads past it wait for the |
