Repository navigation
Conversation
alacritty_terminal has its own OSC 52 gate ahead of the event listener, and its default (Osc52::OnlyCopy) drops read requests inside the engine. Ember built its Term with Config::default() and never set it, so since the gated clipboard read shipped in 0.5.0 the listener's ClipboardLoad arm never ran. A read got no reply at all: osc52_read = true had no effect, and with it off the documented empty reply never went out, leaving a program that waits on its query to hang. The engine now accepts both copy and paste (Osc52::CopyPaste), and the listener stays the single gate on clipboard contents: the real contents only with osc52_read = true, an empty reply otherwise (the default). Nothing new is exposed. The existing test missed this because it handed a synthetic ClipboardLoad straight to the listener, bypassing the engine gate. The new test sends the real escape bytes through the engine; it failed with an empty outbox before this change and passes after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014xVjnf8UuQPRQtv2QqgpPK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the gated OSC 52 clipboard read that shipped in 0.5.0, which has never actually replied.
The bug
alacritty_terminalhas its own OSC 52 gate ahead of the event listener, and its default,Osc52::OnlyCopy, drops reads inside the engine (term/mod.rs,clipboard_load). Ember built itsTermwithConfig::default()and never setosc52, so the listener'sClipboardLoadarm never ran:osc52_read = truehad no effect.The fix
Build the engine with
osc52: Osc52::CopyPaste. The listener stays the single gate on contents: the real clipboard only withosc52_read = true, and an empty reply otherwise. Copy behaviour is unchanged, and nothing new is exposed. This is the only place Ember constructs aTerm.Why the existing test didn't catch it
osc52_read_gated_off_replies_emptyhands a syntheticClipboardLoadevent straight to the listener, bypassing the engine gate that drops the real one. The newosc52_read_through_the_engine_replies_emptysends the real escape bytes (ESC]52;c;?BEL) through the projection. It failed before this change (left: "") and passes after.Validation
cargo fmt --check,clippy -D warnings,cargo test --all --all-featuresand the grid conformance corpus (7/7) are all clean. A CHANGELOG[Unreleased]entry is added.🤖 Generated with Claude Code
https://claude.ai/code/session_014xVjnf8UuQPRQtv2QqgpPK