Let copy-on-select copy plain text (currently always includes an HTML flavor) #13339
Replies: 1 comment
|
Duplicate of #12971, which predates this and asks for the same thing (format control for copy-on-select). Consolidating there. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The idea
Give
copy-on-selectcontrol over the copy format, the same way thecopy_to_clipboardkeybind already has one. Either let it take a format (e.g.plain/mixed) or add a separate option,defaulting to
plainfor backwards compatibility (matching the original intent noted in #9397).Why
Since #9418 changed the default copy format to
mixed,copy-on-selectalways writes bothtext/plainand atext/htmlflavor, with no way to opt out. The keybind gained a format parameter;copy-on-select did not.
On macOS this breaks pasting selected text into some Electron apps (Microsoft Teams, for example). Ghostty emits the selection as:
with raw
\nand no<br>tags. Apps that strip thewhite-space: prestyle collapse every newline onto one line. Native macOS fields and VS Code paste fine because they use thetext/plainflavor; only apps that prefer and mishandle the HTML are affected.
Workaround today is to use Cmd+C with
copy_to_clipboard:plain, but there's no equivalent for select-to-copy.Reproduce
copy-on-select = clipboard(or defaulttrue)Confirm the HTML flavor is present:
Environment
Note
Distinct from #12600, which covers the copy destination (primary vs system clipboard). This is about the copy format (plain vs HTML).
All reactions