A kitty clipboard write that asks first is answered done before the user answers #31
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
wayfinder:map
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jeff/harrier#31
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?
With
clipboard.write = .ask, a kitty clipboard write (OSC 5522) is answered "done" as soon as it commits, before the user has answered the Confirmation.Session.clipboardWritereplies success and only then raises the write for the window to ask about. A write the user refuses has already been reported to the program as a success.Found while working out #23. It isn't caused by multiple Clipboard types.
The protocol has EPERM for a refused write. Answering it needs the write's reply to be deferred until the Confirmation is answered, as reads already are. The Ghostty fork's write path has no deferral today, so this likely needs a fork change like the one reads got (ADR 0005).
Fixed in
4bed3a9, on Ghostty fork commit 0afdd944b (clipboard.Write.deferReplyandHandler.replyClipboardWrite). A kitty write now hears DONE once it is on the clipboard, and EPERM when.denyor the user refuses it (.denyalso used to be answered DONE). It hears ENOSYS when the platform can't hold it, and EIO when putting it there fails. A write that is replaced before it's taken, or whose confirmation is replaced, gets EPERM. The sway VM test checks that nothing arrives before the user answers, then DONE for an allowed write and EPERM for a refused one.