microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
94.88k stars 8.22k forks source link

Copying with Ctrl-Shift-C copies literal buffer, not lines #174

Open parkovski opened 6 years ago

parkovski commented 6 years ago

Selecting text and copying with Ctrl-Shift-C copies the buffer literally, which gives a line full of spaces and no newline. Copying with right click works as intended. Verified in cmd.exe, pwsh.exe and zsh.

MichaelTong commented 6 years ago

This still happens on 17713.

tombrown52 commented 5 years ago

This still happens on 1809 (17763).

It seems to me that copy and paste should behave the same, whether done via the mouse (right-click) or keyboard (ctrl+shift+c/v).

As it is, all the extra spaces and lack of newlines makes the keyboard shortcut ctrl+shift+c useless for all but the most simple selections.

miniksa commented 5 years ago

I've filed MSFT: 20265934 to look into this.

zadjii-msft commented 5 years ago

Actually this one might be by design. IIRC, Ctrl-Shift-C always had this behavior, and it always worked, even w/o the "copy/paste with Ctrl-Shift-C/V" checkbox.

Either we should change the text to just say "Paste with Ctrl-Shift-V", or override the usual copy behavior (copy literally) when that box is checked and replace it with the default copy behavior

miniksa commented 5 years ago

The latter is what I'm thinking and why I filed 20265934, @zadjii-msft.

miniksa commented 5 years ago

Moving back to tracking the work here. Here's the comments from the internal issue for whenever I get back to it:

I think what's happening here is that the copy feature already had a VK_SHIFT alternate behavior and that's getting caught up in the new Ctrl+Shift+C feature to enable WSL copying.