tip: Copying from Ghostty on macOS produces garbled whitespace when pasting into Electron apps #10741
Replies: 8 comments 1 reply
|
Works on Linux with Discord; tagging as macOS-only. |
|
I can confirm that this is a problem on MacOS, e.g. when I copy/paste from GhosTTY to MS Teams (don't judge), the line breaks are lost, and it's very annoying. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Also running into this. Copying from Ghostty to Obsidian results in spaces becoming newlines. Ghostty 1.3.1 (build 15212) |
|
Same issue. I'm on Mac Air M2. |
|
Experiencing the same issue on Linux (NixOS, Wayland, Ghostty 1.3.1 GTK build). Copying from Ghostty and pasting into certain web apps spaces become newlines. Pasting into native apps works correctly. |
|
Ditty - if I copy multiple lines containing CSV content I expect to be able to paste it into Excel/Google Sheets and it be multiple lines but instead I get a single line of content. I can paste it into VSCode first and then copy it from there (or pipe the output of the script into |
|
Looks like this is all coming back to the copy on Ghostty being copied as HTML rather than Plain Text - #12971 explains this quite well. I tested this also by copying straight from ghostty and running this: Note the HTML class. If I paste this into VSCode and copy it from there I get: |
Uh oh!
There was an error while loading. Please reload this page.
Issue Description
Copying text from Ghostty tip on macOS and pasting into Electron apps (Claude.ai, Slack, VS Code, etc.) produces garbled output — whitespace is mangled (spaces replaced with newlines, or linebreaks lost entirely, depending on context).
This may be related to #9532 (Linux/Wayland clipboard issues with Electron), but the symptom and platform are different. Pasting from other terminals (Kitty, Terminal.app) into the same Electron apps works correctly.
Expected Behavior
Pasting into Electron apps preserves the original formatting, including spaces.
Actual Behavior
Whitespace is mangled — spaces are replaced with newlines in some cases, and linebreaks are lost in others. For example, copying the output of
ip rand pasting into Claude.ai:From Kitty (correct):
From Ghostty tip (broken):
The issue also affects more complex output like
ip a, where interface names, addresses, and flags all get split onto separate lines.Pasting into non-Electron apps (e.g. native macOS apps) works correctly. Pasting from other terminals (Kitty, Terminal.app) into the same Electron apps also works correctly.
Reproduction Steps
ip r,ls -la,ps aux)Ghostty Logs
No response
Ghostty Version
OS Version Information
MacOS Tahoe 26.3 (25D125)
(Linux only) Display Server
None
(Linux only) Desktop Environment/Window Manager
No response
Minimal Ghostty Configuration
Additional Relevant Configuration
No response
I acknowledge that:
```) on separate lines.All reactions