Tell an ST-terminated OSC from an interrupted one #110
No reviewers
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis!110
Loading…
Reference in a new issue
No description provided.
Delete branch "vt/osc-terminator"
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?
Second step of #67. The parser dispatched an OSC body as soon as an ESC arrived in the string, so a sink could not tell
ESC ] … ESC \fromESC ] … ESC [0m. OSC 7501 may apply a report only once BEL or ST actually ended it, so the grid wiring needs that distinction.What changes
Sink::osc_dispatch(body, bell_terminated: bool)becomesosc_dispatch(body, end: OscEnd)withOscEnd::{Bel, St, Interrupted}.\dispatches the body asSt, and any other byte (including ESC, CAN, SUB, or a C0 control) dispatches it asInterrupted. That byte is then processed exactly as before, so sinks see events in the same order.Interrupted.end, just as it ignoredbell_terminated, so every OSC applies as before. The only difference is timing: an OSC ended by a lone ESC dispatches when the following byte arrives, not at the ESC itself.osc_pendingflag is carried in the parser's upgrade dump.check_restoredrejects a pending OSC outsideEscape. The dump has not shipped in a release, soDUMP_VERSIONstays the same.This is an API break for out-of-tree
Sinkimplementors.Tests
osc_dispatch_reports_how_each_osc_ended: a random stream of OSCs, each with a random ending, fed at random chunk boundaries, must yield exactly the expected(body, end)list.transition_to's!matches!(next, State::OscString)guard, which is the equivalent mutant already documented above that match.just checkpasses.