Repository navigation
Copying wrapped lines includes line breaks instead of joining them #11215
|
When copying text from the terminal in Ghostty, wrapped lines are copied with the line break instead of being joined into a single line. For example, if the terminal window is narrow and the command wraps like this: When I select the full text ( Instead of: In other words, the wrapped line break is preserved in the copied text, even though it is only a visual wrap caused by the terminal width. Is there a way for Ghostty to copy wrapped lines as a single line (similar to how some terminals treat soft-wrapped lines)? |
Replies: 2 comments 2 replies
|
I don't think there is as ghostty isn't aware at all that text may have been broken onto another line if a program is the one handling the splitting. All it knows is some program said put this character here. I don't think im seeing this behavior though anyways could you show a video perhaps? I tested this on 1.2.3 and main, I also tested if the output of a command wrapped if it didnt work and it will worked just fine, along with bash and fish output.mp4 |
|
If Ghostty wraps the text, it copies the wrapped text. If the shell wraps the text, we do not because we don't know its wrapped. |
If Ghostty wraps the text, it copies the wrapped text. If the shell wraps the text, we do not because we don't know its wrapped.