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

shift+select then copy converts line breaks to wraparound padding #130

Closed
mqudsi opened this issue Mar 12, 2018 · 8 comments
Closed

shift+select then copy converts line breaks to wraparound padding #130

mqudsi opened this issue Mar 12, 2018 · 8 comments
Labels
Area-Interaction Interacting with the vintage console window (as opposed to driving via API or hooks) Issue-Question For questions or discussion Product-Conhost For issues in the Console codebase Resolution-Answered Related to questions that have been answered Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@mqudsi
Copy link

mqudsi commented Mar 12, 2018

Running 17115:

Copy-and-pasting text from conemu/wsl results in what should be hard line breaks copied as a single line with whitespace spanning the distance from the line break location and the end of the window. This only occurs if the text was selected with shift held down. Selecting the text normally copies the hard line breaks without trailing whitespace as expected.

e.g. for this screenshot:

image

Selecting the text by placing the cursor at the end of the text, depressing the left mouse button, and dragging to the top, then copying results in the following on the clipboard:

mqudsi@ZBook:~/random/fish-shell$ gdb ./build/fish
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./build/fish...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/mqudsi/random/fish-shell/build/fish
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGFPE, Arithmetic exception.
0x000000000056eae8 in std::__detail::_Mod_range_hashing::operator()(unsigned long, unsigned long) const ()
(gdb)

But doing the same with the shift key held down copies the following to the keyboard:

mqudsi@ZBook:~/random/fish-shell$ gdb ./build/fish                                                                                          GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1                                                                                                Copyright (C) 2016 Free Software Foundation, Inc.                                                                                           License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>                                                               This is free software: you are free to change and redistribute it.                                                                          There is NO WARRANTY, to the extent permitted by law.  Type "show copying"                                                                  and "show warranty" for details.                                                                                                            This GDB was configured as "x86_64-linux-gnu".                                                                                              Type "show configuration" for configuration details.                                                                                        For bug reporting instructions, please see:                                                                                                 <http://www.gnu.org/software/gdb/bugs/>.                                                                                                    Find the GDB manual and other documentation resources online at:                                                                            <http://www.gnu.org/software/gdb/documentation/>.                                                                                           For help, type "help".                                                                                                                      Type "apropos word" to search for commands related to "word"...                                                                             Reading symbols from ./build/fish...(no debugging symbols found)...done.                                                                    (gdb) run                                                                                                                                   Starting program: /home/mqudsi/random/fish-shell/build/fish                                                                                 [Thread debugging using libthread_db enabled]                                                                                               Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".                                                                                                                                                                                                              Program received signal SIGFPE, Arithmetic exception.                                                                                       0x000000000056eae8 in std::__detail::_Mod_range_hashing::operator()(unsigned long, unsigned long) const ()                                  (gdb)                                                                                                                                                                                                                                                                                                                                   

Generally speaking, holding down the shift key is used as an indication that the mouse operation should not be passed through to the program running in the terminal, but should otherwise result in the same contents. To be able to select and copy text with a mouse-aware console application running (e.g. vim or tmux).

@mqudsi
Copy link
Author

mqudsi commented Aug 17, 2018

@zadjii-msft @bitcrazed any chance of taking a look at this? It's still the case in the latest skip forward builds and I'm pretty sure it's a regression from the initial Windows 10 release.

@kissge
Copy link

kissge commented Feb 23, 2019

Any updates?

Unfortunately, this behavior design is inherited to the new (1809) Ctrl+Shift+C copy experience.
It basically means that there's no shortcut for copying texts, that can also work with multiple lines, which are what most people actually wants.
#65 seems to have discussed a relevant topic.

@zadjii-msft
Copy link
Member

zadjii-msft commented Feb 23, 2019 via email

@kissge
Copy link

kissge commented Feb 24, 2019

Lucky to know that! Thanks for pointing out.

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added Area-Interaction Interacting with the vintage console window (as opposed to driving via API or hooks) Issue-Question For questions or discussion Product-Conhost For issues in the Console codebase Resolution-Answered Related to questions that have been answered Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. labels May 29, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 29, 2019
@miniksa
Copy link
Member

miniksa commented May 29, 2019

This goes hand in hand with #174. We don't need two issues to track this weirdness, so closing this one.

@miniksa miniksa closed this as completed May 29, 2019
@mqudsi
Copy link
Author

mqudsi commented May 29, 2019

In all fairness, that one wasn't around when I filed this one ;)

Thanks for working on it, @miniksa

@miniksa
Copy link
Member

miniksa commented May 29, 2019

Yeah, true, I know. I just had to pick one and I picked the other one. Hopefully no hard feelings.

@mqudsi
Copy link
Author

mqudsi commented May 30, 2019

None whatsoever!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Interaction Interacting with the vintage console window (as opposed to driving via API or hooks) Issue-Question For questions or discussion Product-Conhost For issues in the Console codebase Resolution-Answered Related to questions that have been answered 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