Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal is mistaking word wrapping as actual line breaks when copy/pasting #9183

Closed
nofunatall opened this issue Feb 16, 2021 · 6 comments
Closed
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@nofunatall
Copy link

Terminal is mistaking word wrapping as actual line breaks when copy/pasting when using WSL2

Is there some option to disable this?
It's very annoying especially if you have your terminal window on a horizontal monitor screen.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Feb 16, 2021
@DHowett
Copy link
Member

DHowett commented Feb 16, 2021

This depends greatly on the program that is producing the text. We have seen instances where bash and tmux (for example) detect the width of the terminal and intentionally insert line or word breaks at the appropriate column.

Terminals in general can only detect wrapped text when the application explicitly sends unwrapped lines.

What application are you using in WSL2?

(also, it is very helpful for us if you use the bug reporting template. It has a field for the version of Terminal you’re using and any other software that might impact your issue. It’s harder on us when we have to triage issues that are missing the template!)

@DHowett
Copy link
Member

DHowett commented Feb 16, 2021

There is an option to Copy—i believe it’s holding down Shift?—that will delete line breaks even if they were intentional(!). Shift+right click or ctrl+shift+c should do it. I think there’s a config option for the copy key binding as well that will let you strip newlines.

@DHowett DHowett added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Feb 16, 2021
@nofunatall
Copy link
Author

Sometimes not even from any open application just copying something from say bash history or even something from my command line.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Feb 16, 2021
@dphadke-msft
Copy link

dphadke-msft commented Feb 16, 2021

Double-click select correctly selects a entire output line regardless of wrapping in Linux terminal apps and PuTTY as well. It's definitely annoying to copy partial line in Terminal (WSL or SSH) or ending up with undue line breaks during copy-paste.
Line wrap != New line.

@zadjii-msft
Copy link
Member

(_How the heck did this one escape the triage queue..? _)

Do you have a specific set of repro steps what are reproing this behavior? We've got a tricksy bug over in #6901 where sometimes, conpty does something that ends up breaking lines that should have wrapped, but we don't have a good consistent repro for that one. If you've got a consistent repro, that would be much appreciated in that thread ☺️

/dup #6901

@ghost
Copy link

ghost commented Apr 23, 2021

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Apr 23, 2021
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements Needs-Attention The core contributors need to come back around and look at this ASAP. labels Apr 23, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

4 participants