Repository navigation
Copy/paste produces incorrect line breaks on macOS (Ghostty 1.3.1) #12842
Issue DescriptionText copied from Ghostty via Cmd+C (or Edit → Copy) has corrupted line breaks. Hard newlines ( Tested with This does not appear to be the soft-wrap issue discussed in #11215 / #6815. Content is not soft-wrapping (window is wide enough), and Expected BehaviorCopying the output of This is what Terminal.app produces, and what Actual Behaviorfish shell: Output newlines are stripped (five lines become one). The prompt above is broken into fragments with spurious newlines: zsh: All newlines stripped — everything merges into a single continuous line: Reproduction Steps
Ghostty LogsNo response Ghostty VersionOS Version InformationmacOS 26.05 (25F71) (Linux only) Display ServerNone (Linux only) Desktop Environment/Window ManagerNo response Minimal Ghostty ConfigurationN/A — issue reproduces with ghostty --config-file=/dev/null (empty config)Additional Relevant ConfigurationNo response I acknowledge that:
|
Replies: 5 comments 5 replies
|
Closing this — after further testing, the issue only occurs when pasting into the Claude.ai chat input box. Pasting into Notes, VS Code, TextEdit, and other apps all works correctly. This is not a Ghostty issue. Apologies for the noise. |
|
This happens to me when running tmux through Ghostty and I haven't been able to identify the underlying reason. If anybody has an idea what to try, feel free to share. |
|
Update: tracked this down. It's the Workaround: This forces plain-text-only copy and fixes pasting into Claude.ai. |
This comment was marked as disruptive content.
This comment was marked as disruptive content.
|
Confirming the issue: Text copied from Ghostty into non plain-text apps (Obsidian, MS Teams, rich text html input fields, ...) swallows line breaks. But also adds other line breaks. Text in Ghostty / zsh … becomes when pasted: The proposed workaround fixes the problem. You may reconsider re-opening this issue. ghostty 1.3.2, oh-my-zsh & powerlevel10k, mac OS 15.7.7 |
Update: tracked this down. It's the
mixedclipboard format (default since 1.3.0) — Ghostty puts bothtext/plainandtext/htmlon the clipboard, but the HTML has no<br>, so newlines collapse. Apps that read plain text (VS Code, pbcopy, Terminal) are fine; apps that prefer the HTML flavor (the Claude.ai chat input, Claude Code per #2709) merge the lines. Same root cause as #2709.Workaround:
This forces plain-text-only copy and fixes pasting into Claude.ai.