grid: disarm a pending zero-width joiner on the C0 cursor controls #414
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!414
Loading…
Reference in a new issue
No description provided.
Delete branch "grid/zwj-c0-disarm"
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?
Closes #412
A pending zero-width joiner (
Grid::zwj_pending, armed by the ZWJ fold and consumed by the next print) now disarms on the C0 controls that move the cursor: BS, HT, LF, VT, FF, CR. Before, when one of them put the cursor right behind a cluster ending in a joiner, the next emoji folded into that cluster:Which controls
kitty's
draw_control_charrebuilds its segmentation state at exactly BS, HT, LF/VT/FF and CR (from the cell left of the new cursor) and keeps it across BEL. felis keeps the GB11 join stream-scoped rather than re-deriving it from cells, so the equivalent is to disarm at those controls. BEL stays transparent: it leaves the cursor at the joiner (pinned bybell_keeps_a_pending_zwj_armed). CSI sequences are out of scope: SGR between a joiner and the next base keeps joining, as in kitty and ghostty.Both print paths
The per-byte and batched paths share
Sink::executefor controls, so the one reset covers both.cursor_controls_disarm_a_pending_zwj_on_both_pathsruns the same streams through the #410 per-byte-vs-batched oracle at chunk sizes 1 and unbounded.The #410 proptest was not extended: its oracle compares the two print paths, which share
execute, so it cannot see this class. Each control has a deterministic test instead (crates/felis-grid/src/tests.rs), each verified to fail without the fix.Docs
CHANGELOG "Fixed" entry; one sentence in
docs/explanation/data-model/grid-and-cells.md"Building a cluster" on how far the continuation reaches.