-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Comments
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!) |
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. |
Sometimes not even from any open application just copying something from say bash history or even something from my command line. |
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. |
(_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 |
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! |
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.
The text was updated successfully, but these errors were encountered: