-
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
Copying multi-line text and pasting to a file puts all text onto single line #65
Comments
In the video, it looks like everything is working as it should. Line breaks are carried over where they exist and the SSH key, which contains no line breaks, remains unbroken. The issue with the whitespace is a problem with the way Vim's automatic indentation works. It can be avoided by running Edit: just noticed this is on WSL; the clipboard register doesn't work there, yet, as far as I know. |
Sorry for the delay in getting back. Yeah I've been trough the whole set paste stuff as I'm familiar with vim itself. |
The same has been happening to me for as long as I can remember. Using This is copied with CTRL+SHIFT+C:
This is copied with right-click:
The difference I think is that with CTRL+SHIFT+C the trailing spaces after the ending of a line are copied into the clipboard as if it were a whole line running for as long as the selection ends. Copying with right-click that trailing spaces are gone, and the line-breaks are respected. Using Microsoft Windows [Versión 10.0.18267.1001] |
I'm fairly certain that Ctrl+Shift+C in conhost has ALWAYS copied text without newlines. I also don't believe we could change that - for every person who doesn't expect C-S-c to copy without newlines, there's another person out there who will complain if we fix it, asking "why doesn't Ctrl+Shift+C copy without newlines anymore?" @JeremyCCHsu I believe that |
Thanks for clarification. I actually found out that:
I didn't notice this behavioral difference (with or without Shift). |
I think that's a cop-out. I can't think of any reason why you'd want to copy multiple lines into a single line. I think copying from ctrl+shift+c should exhibit the same behavior as with right-clicking. That's just what makes intuitive sense. And I can't think of any terminal emulator that copies multiline text into a single line. |
Maybe obvious for many but I just realized that you can use |
Your Windows build number:
Microsoft Windows [Version 10.0.16299.192]
What you're doing and what's happening:
When copying a few lines from the centre of a file with Ctrl + Shift + C I'm getting multi-line text put onto a single line.
So in my scenario:
The issue is that it puts all the multi-line text onto one single line separated by large amounts of white-space rather than discovering the line endings and breaking as required.
This is obviously not expected behaviour and appears to have something to do with the Windows line endings though I can only speculate this based on what I've seen and how I do not see this behaviour happen on my native Linux system.
This happens with or without "Enable 'line wrapping selection" checked and unchecked.
It seems like it is copying all of the white-space around the text even though there is non in the file.
I should note that if, for example, I copy and paste everything I'm writing here right now, it works fine.
It only seems to be when I'm in bash itself and working within that environment.
I've recorded a video of this happening too: https://youtu.be/Z-M5P7ZTJqs
What's wrong / what should be happening instead:
It should paste the multi-line content as multiple lines, not a single long line with lots of white-space.
The text was updated successfully, but these errors were encountered: