Skip to content

fix(tui): strip NUL characters before clipboard writes - #48337

Merged
simonklee merged 1 commit into
anomalyco:v2from
simonklee:clipboard-nul-strip
Sep 10, 2026
Merged

fix(tui): strip NUL characters before clipboard writes#48337
simonklee merged 1 commit into
anomalyco:v2from
simonklee:clipboard-nul-strip

Conversation

@simonklee

Copy link
Copy Markdown
Member

Fixes #44198

OpenTUI rejects clipboard text containing NUL before any host or terminal write, so /copy fails for sessions whose shell output includes NUL bytes. This drops NULs at the shared TUI write() boundary so the rest of the transcript can copy. /export is unchanged.

This is the v2 equivalent of the OpenTUI clipboard-adapter approach in #44197. It does not use the old spawn/OSC 52 clipboard from #44230 (dev).

OpenTUI rejects clipboard text containing NUL before any destination, so
shell output with embedded NULs made /copy fail entirely. Drop NULs at
the shared TUI write boundary so the rest of the transcript can copy.
@simonklee
simonklee merged commit eb357f1 into anomalyco:v2 Sep 10, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant