-
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
Copy inconsistently copies as "copyTextWithoutNewlines" #2275
Comments
These are my copy bindings, but I've confirmed if I remove
|
Adding Help-Wanted, in case I can't get to it in time. #1093 is the PR that created these options, so that'll be a good idea of where to start looking. |
I think I can reproduce this issue if i just open a cmd, hit enter a few times to generate a few lines new lines and then resize the window (shrink it into a small window). If I didn't resize the window then new lines were preserved but once everything had to reflow newlines don't get preserved anymore. Weird. |
Turns out, the clipboard code is correct. ConHost uses the same clipboard code. The issue arises with the In the example above, say the output is displayed as follows (line numbers on left):
This means that the wrap is supposed to be...
@miniksa and I tried doing a proper fix in branch We also updated the The result was the following:
@miniksa was saying that this is a combined problem between the TerminalApi and the VTRenderer. May also be related to #780. @zadjii-msft @miniksa Thoughts? EDIT: I just tried reverting the change to the TerminalApi and this particular instance is fixed. Is that correct? |
I confirm this incorrect and very annoying behavior, compare these two files: FromPS7p3RunningInWindowsTerminal.docx |
🎉This issue was addressed in #2797, which has now been successfully released as Handy links: |
It seems like this issue is not solved for me. When I select text, righ-click it and paste, it's all pasted as 'a single line'.. Version is 0.5.2681.0. Makes it very hard to use vim in a productive way.. |
Just to be sure: you're copying from Terminal, and pasting into Terminal? |
I have this problem on version |
@sba923 Correct, copying from terminal wsl2 Ubuntu to same tab terminal wsl2 Ubuntu |
Sometimes I can repro this, sometimes I can't. I'm using bash in WSL 1 Ubuntu 18.04. I'm generating 4 lines using:
From there, I select the 3 "echo" lines and copy them. Then I paste them back. Sometimes I get: which is correct, sometimes I get this instead: which is incorrect. When I launch a new tab, the behavior is always correct. If I use "clear" in bash to clear the terminal, the behavior is from there on always incorrect. HTH |
@Drugoy Do you have a reason why you'd like this reopened? This was presumably fixed almost a year ago, so if you're seeing something like this, then it's probably from an unrelated root cause that would deserve it's own investigation. |
@zadjii-msft just realized this is a wrong repo to report. I use built-in (cmd.exe) terminal, not 'windows terminal'. But yeah, I have this issue. |
Well, this is actually the repo for both the Windows Terminal and the vintage console ( |
Environment
Steps to reproduce
Expected behavior
Newlines to be copied
Actual behavior
Newlines are thrown away:
I've confirmed that @drewnoakes and @davidwengier can also reproduce this. Occasionally it will copy the newlines but have not been able to figure out logic.
The text was updated successfully, but these errors were encountered: