[v0.1/Protocol] Implement DECCARA / DECRARA rectangular attribute ops #188
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
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis#188
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What
Implement DECCARA (
CSI Pt;Pl;Pb;Pr;Ps... $ r) and DECRARA (CSI Pt;Pl;Pb;Pr;Ps... $ t): change and reversecharacter attributes inside a rectangle. They are the last
❌ not yetrow of the rectangular-editing family indocs/reference/protocols/support-matrix.md; every neighbor (DECCRA, DECFRA, DECERA, DECSERA, DECRQCRA) is✅.#181 recorded the stance: adopt. The
Pt;Pl;Pb;Prbounds model is already specified(
docs/reference/protocols/vt-compliance.md"Rectangular editing"), the SGR pen exists, and DECSACE (CSI Ps * x),which selects rectangle vs stream extent for these two operations, is already parsed and stored (
dec_saceincrates/felis-grid/src/sink.rs). What is missing is the two dispatch arms and the attribute-merge pass.Where
crates/felis-grid/src/sink.rs: two arms beside the existing(&[b'$'], b'v' | b'x' | b'z' | b'{')rectangledispatch, for
(&[b'$'], b'r')and(&[b'$'], b't').crates/felis-grid/src/editing.rs: the operations themselves, reusing the shared rectangle-bounds normalization theother four use (origin mode, margins, clamping, degenerate rectangles) and honoring
dec_sace.untouched (it is a merge, not a pen replacement); DECRARA toggles them. Only the attribute subset xterm accepts here
(bold, faint, italic, blink, reverse, underline variants, invisible, strike) participates; colors are not part of
either operation.
Tests
crates/felis-grid/tests/snapshot_csi.rs/snapshot_csi_handlers.rs: one snapshot per operation, plus one for theDECSACE stream-extent variant and one for a rectangle clipped by margins under origin mode.
crates/felis-grid/tests/proptest_rect_ops.rswith the two new operations: bounds normalization must matchthe family (no panic, no out-of-grid write, degenerate rectangles are no-ops).
Cascade
docs/reference/protocols/support-matrix.md(row flips to✅),docs/reference/protocols/vt-compliance.md"Rectangular editing", and the landscape stance line from #181.Split from #181.