-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Copy and paste from the Windows Terminal doesn't include line breaks #1073
Comments
Huh, I'm not seeing this - @carlos-zamora thoughts? |
@zadjii-msft There's some terminal state change that causes it. Repro steps:
I've been well aware of this working on the clipboard stuff, but haven't tracked down the bug yet. The bug probably manifests in TextBuffer::GetTextForClipboard, but I haven't had the time to debug it yet. |
Closing in favor of #1091. |
It turns out that this is a different issue. |
I edited the issue to add correct instruction to reproduce. |
I'm seeing this as well. My shell is Powershell Core 6.2.0 and everything I try to copy has this problem. It seems that the copy functionality copies the whole buffer. Ie, if I'm trying to copy this:
It copies this, where
|
I'm having same issue. when entering a copied command like:
It only runs the very first line... when using WSL directly, works as expected. |
I also have this issue when copying text out of an SSH session to a Linux host. Currently working around it by having this script on my desktop and giving it a double click when I have something I need to paste out of Terminal:
|
I think I found an easier reproduce steps.
|
Thank you, @d-bingham, from all of us waiting on the issue. |
Now, can we get feature to move tabs around by using cursor and if you have many tabs they don't hide behind '+' character please! LOL 💃 |
It's not on-topic for this particular issue, but the tabs are getting a bit of a boost in 0.6. See the tree of issues linked from #3027. |
🎉This issue was addressed in #3239, which has now been successfully released as Handy links: |
Still not fixed, when you copy it will add new line.
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
…________________________________
From: Carlos Zamora <notifications@github.com>
Sent: Friday, October 18, 2019 5:45:03 AM
To: microsoft/terminal <terminal@noreply.github.com>
Cc: mikkushukla <shubhanshu.shukla@live.com>; Comment <comment@noreply.github.com>
Subject: Re: [microsoft/terminal] Copy and paste from the Windows Terminal doesn't include line breaks (#1073)
Closed #1073<#1073> via #3239<#3239>.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#1073?email_source=notifications&email_token=ADAODLTW7NICSNEHDRSD27LQPD5YPA5CNFSM4HRMLYM2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOUJH2SOY#event-2723129659>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADAODLU24DCANWUUX332TNDQPD5YPANCNFSM4HRMLYMQ>.
|
This bug is not related to pasting into Terminal, it is pasting from Terminal. I believe what you're referring to is discussed in #1091. |
I use different terminal emulators in Win10 1903 and all of them have the same problem. Clipboard: govc find / -type m -name 'dev1-' | xargs govc vm.ip -a -v4 |
Those are definitely not line breaks that you’re missing... would you mind filing a new separate issue and following the issue template? Thanks. |
For what it’s worth: if multiple terminal emulators experience the same issue, it’s probably something in your shell. |
Terminal freezes during post laptop sleep and network disconnect. Every time I have to force kill the app via task manager.
Is this a known issue?
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Dustin L. Howett (MSFT) <notifications@github.com>
Sent: Monday, November 18, 2019 12:53:38 PM
To: microsoft/terminal <terminal@noreply.github.com>
Cc: mikkushukla <shubhanshu.shukla@live.com>; Comment <comment@noreply.github.com>
Subject: Re: [microsoft/terminal] Copy and paste from the Windows Terminal doesn't include line breaks (#1073)
For what it’s worth: if multiple terminal emulators experience the same issue, it’s probably something in your shell.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#1073?email_source=notifications&email_token=ADAODLWZX7H3UFMSROGFRMDQUI7HVA5CNFSM4HRMLYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEJOGGA#issuecomment-554885912>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADAODLS7INF25WKKKYX3USTQUI7HVANCNFSM4HRMLYMQ>.
________________________________
From: Dustin L. Howett (MSFT) <notifications@github.com>
Sent: Monday, November 18, 2019 12:53:38 PM
To: microsoft/terminal <terminal@noreply.github.com>
Cc: mikkushukla <shubhanshu.shukla@live.com>; Comment <comment@noreply.github.com>
Subject: Re: [microsoft/terminal] Copy and paste from the Windows Terminal doesn't include line breaks (#1073)
For what it’s worth: if multiple terminal emulators experience the same issue, it’s probably something in your shell.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#1073?email_source=notifications&email_token=ADAODLWZX7H3UFMSROGFRMDQUI7HVA5CNFSM4HRMLYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEJOGGA#issuecomment-554885912>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADAODLS7INF25WKKKYX3USTQUI7HVANCNFSM4HRMLYMQ>.
|
@mikkushukla, please open a new issue to report the problem: https://github.com/microsoft/terminal/issues |
@mikkushukla
The problem you described is not related to this issue. |
Windows Terminal (Preview) Still experiencing this. |
Because of freeze issue I have stopped using terminal. I am using command prompt as it is more reliable. If this is fixed in 0.0.3291.0 I will start using again and will update If i face the same issue.
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Stanislav N. <notifications@github.com>
Sent: Sunday, December 8, 2019 10:09:13 PM
To: microsoft/terminal <terminal@noreply.github.com>
Cc: mikkushukla <shubhanshu.shukla@live.com>; Mention <mention@noreply.github.com>
Subject: Re: [microsoft/terminal] Copy and paste from the Windows Terminal doesn't include line breaks (#1073)
Windows Terminal (Preview)
Version: 0.7.3291.0
Still experiencing this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1073?email_source=notifications&email_token=ADAODLR3TDU6UE5XHBIP2SDQXUPLDA5CNFSM4HRMLYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGHDHFA#issuecomment-562967444>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADAODLW37YROKWH374IEQADQXUPLDANCNFSM4HRMLYMQ>.
|
@pztrn, you may be best served opening anew issue and referencing this one. Ensure you provide all relevant information to reproduce the problem. @mikkushukla: Your statement has nothing to do with this bug report. If you have issues that are unrelated to line breaks in copy and paste functionality, please open a new bug report. |
meet this in terminal 1.0 wsl2 ubuntu 18.04
PS:
|
Found this issue too If I copy from terminal pasting preserves multiple lines. But If I am inside vim when copying and pasting the line breaks dissapear. Resulting in one long line. My full environment is: Windows terminal, powershell, logged via ssh to a linux box that is running tmux and inside is running vim. |
@JesusCoyotzi could you submit a new bug report here? Please include specific steps on how you performed the copy/paste and what you're running there. Sounds like a real issue but we should be tracking this in more detail separately. |
I am on a new machine using Windows 11 and I'm experiencing this problem in the WSL console.
The pasted text will be one line with spaces between the text that should be on separate lines. NOTE: I have the Ctrl+Shift+C/V option enabled |
@zd3nik That's by design for Ctrl+shift+c. See #65 (comment) Copy-paste is significantly more reasonable and configurable in the Windows Terminal, I'd recommend that. Conhost's copy-paste is pretty significantly burdened by years of legacy behavior. |
That's unfortunate. Because automatically copying whatever you select into the clipboard is.... not ideal. Especially when simply clicking somewhere in the terminal (say, to put focus on the terminal) highlights part of the terminal text (one character). So I'm constantly blowing whatever useful data I may have had in my clipboard whenever I click on a windows terminal window. Not ideal. If the terminal was at least smart enough to only highlight when you "drag" the mouse pointer over part of the terminal instead, then it wouldn't be so detrimental to automatically put whatever you highlight into the clipboard. |
@zd3nik I think you're confusing the vintage Windows Console (conhost.exe) and the modern Windows Terminal. Looking at that screenshot, those are the settings for conhost, not the Terminal. Copying in the console is pretty rachet, yea. But the experience is substantially better in the Terminal. We've already (like, two years ago) made adjustments to how selecting on a click/drag works, to be more like what you suggest. We've made what keys are used for copy/paste configurable, including whether or not a copy copies as a single line or not. I'd give that a try. Seeing as you're on Windows 11, the new Terminal comes with Windows 11, so it should be there already. |
Thanks for the info @zadjii-msft. Is there a way to select which terminal is used for wsl? I'm just using the terminal that it opens when I launch my wsl console. |
Check out this blog post |
Environment
Steps to reproduce
docker run --rm -it mcr.microsoft.com/windows/nanoserver:1903
Expected behavior
I expected to see the same thing I saw in the terminal - specifically multiple lines.
Actual behavior
One line with lots of space.
Notes
This is different from #65 since it was about conhost and I'm talking about the new terminal, and I didn't have Shift pressed.
The text was updated successfully, but these errors were encountered: