[FEATURE]: Maintain newline when copying output #7244

Open
opened 2026-02-16 18:06:33 -05:00 by yindo · 4 comments
Owner

Originally created by @adrianveen on GitHub (Jan 22, 2026).

Originally assigned to: @rekram1-node on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

When copying a block of text, new lines are not copied over. For example:

Some text here

and some text here

After copied, will paste to

Some text here
and some text here

Expected outcome:
new line is respected, eg.:

Some text here

and some text here
Originally created by @adrianveen on GitHub (Jan 22, 2026). Originally assigned to: @rekram1-node on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request When copying a block of text, new lines are not copied over. For example: ```bash Some text here and some text here ``` After copied, will paste to ``` Some text here and some text here ``` Expected outcome: new line is respected, eg.: ``` Some text here and some text here ```
yindo added the discussion label 2026-02-16 18:06:33 -05:00
Author
Owner

@dkraemerwork commented on GitHub (Jan 22, 2026):

The feature you are requesting is default behaviour. It has to be a local problem on your machine or terminal interface.

@dkraemerwork commented on GitHub (Jan 22, 2026): The feature you are requesting is default behaviour. It has to be a local problem on your machine or terminal interface.
Author
Owner

@adrianveen commented on GitHub (Jan 23, 2026):

The feature you are requesting is default behaviour. It has to be a local problem on your machine or terminal interface.

Any suggestions on figuring out why the newline might be getting dropped for me?

I get the same results on konsole and kitty. I don't see any options in my clipboard that seem related. The closest one was trimming whitespace at the start or end of a selection (so no the situation I outlined) but this does not change the behaviour.

@adrianveen commented on GitHub (Jan 23, 2026): > The feature you are requesting is default behaviour. It has to be a local problem on your machine or terminal interface. Any suggestions on figuring out why the newline might be getting dropped for me? I get the same results on konsole and kitty. I don't see any options in my clipboard that seem related. The closest one was trimming whitespace at the start or end of a selection (so no the situation I outlined) but this does not change the behaviour.
Author
Owner

@i8ramin commented on GitHub (Feb 1, 2026):

Also curious about this. Output copied from Opencode is missing newlines, but copied from other CLI tools like Claude Code are just fine. Using iTerm2

@i8ramin commented on GitHub (Feb 1, 2026): Also curious about this. Output copied from Opencode is missing newlines, but copied from other CLI tools like Claude Code are just fine. Using iTerm2
Author
Owner

@itkach commented on GitHub (Feb 3, 2026):

Blank lines in text copied from opencode are missing for me on MacOS, both iTerm2 and Ghostty (in built-in MacOS Terminal copy doesn't work at all, "Copied to clipboard" notification pops up but nothing is actually copied)

@itkach commented on GitHub (Feb 3, 2026): Blank lines in text copied from opencode are missing for me on MacOS, both iTerm2 and Ghostty (in built-in MacOS Terminal copy doesn't work at all, "Copied to clipboard" notification pops up but nothing is actually copied)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7244