Repository navigation
Copy clipboard history text as text/plain - #15137
omarchybot wants to merge 1 commit into
Conversation
Untyped, wl-copy asks xdg-mime to sniff the bytes, and some valid UTF-8 text (two spaces and a Cyrillic word) comes back as application/x-dtsz, so the restored entry offers no text type and text paste fails. Fixes #12662 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Closing this as a duplicate of #12801, which was opened earlier against The change to Checked by Claude Opus 5.5 comparing the two diffs; the classification as a bug was agreed by Codex Medium, and |
Restoring a text entry from clipboard history (Enter or Shift+Enter in
Super+Ctrl+V) runsomarchy-clipboard-paste-text, which piped the text towl-copywithout a type. Untyped,wl-copyasksxdg-mimeto sniff the bytes, andfileclassifies some valid UTF-8 text as binary: two spaces, a Cyrillic word and a newline come back asapplication/x-dtsz. The restored selection then offers only that type, sowl-paste --type textand every text paste consumer refuse it, though the entry is still in history and was stored as text.Both copies in the helper — the history entry by index, and text given as an argument — now pass
--type "text/plain;charset=utf-8", the spelling the open #14688 and #14760 use for their text copies. With a text type,wl-copyalso offerstext/plain,TEXT,STRINGandUTF8_STRING. The history path already refuses anything but atextentry, and capture stores text decoded into JSON strings, so labelling it UTF-8 is accurate. Entries shown as files are stored text too and were never restored astext/uri-list, so nothing about them changes.On an Omarchy worker in a real Wayland session (wl-clipboard 2.3.0, file 5.48), the helper on
quattrooffered onlyapplication/x-dtszon both paths and the text read exited 1; with this change both offer the text types and paste back the exact bytes.clipboard-test.shnow records the arguments itswl-copystub receives and checks both paths pass the type; it fails with the change reverted.Reviewed by Codex Medium, which found nothing to change.
Fixes #12662