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

Closed
opened 2026-01-30 21:46:57 +00:00 by claunia · 8 comments
Owner

Originally created by @parkovski on GitHub (May 10, 2018).

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.

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    17666

  • What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)

PS> echo "foo`nbar"
foo
bar
PS> # copy those two lines with Ctrl-Shift-C and paste into notepad
PS> # should have a line full of spaces before "bar"
  • What's wrong / what should be happening instead:
    It should do the same thing as right click copy - lines have a new line at the end instead of being filled with spaces.
Originally created by @parkovski on GitHub (May 10, 2018). 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. * Your Windows build number: (Type `ver` at a Windows Command Prompt) 17666 * What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots) ``` PS> echo "foo`nbar" foo bar PS> # copy those two lines with Ctrl-Shift-C and paste into notepad PS> # should have a line full of spaces before "bar" ``` * What's wrong / what should be happening instead: It should do the same thing as right click copy - lines have a new line at the end instead of being filled with spaces.
claunia added the Product-ConhostWork-ItemNeeds-TriageIssue-TaskArea-Interaction labels 2026-01-30 21:46:57 +00:00
Author
Owner

@MichaelTong commented on GitHub (Jul 18, 2018):

This still happens on 17713.

@MichaelTong commented on GitHub (Jul 18, 2018): This still happens on 17713.
Author
Owner

@tombrown52 commented on GitHub (Jan 19, 2019):

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.

@tombrown52 commented on GitHub (Jan 19, 2019): 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.
Author
Owner

@miniksa commented on GitHub (Jan 22, 2019):

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

@miniksa commented on GitHub (Jan 22, 2019): I've filed MSFT: 20265934 to look into this.
Author
Owner

@zadjii-msft commented on GitHub (Jan 22, 2019):

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

@zadjii-msft commented on GitHub (Jan 22, 2019): 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
Author
Owner

@miniksa commented on GitHub (Jan 22, 2019):

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

@miniksa commented on GitHub (Jan 22, 2019): The latter is what I'm thinking and why I filed 20265934, @zadjii-msft.
Author
Owner

@miniksa commented on GitHub (May 14, 2019):

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.

@miniksa commented on GitHub (May 14, 2019): 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.
Author
Owner

@fumin commented on GitHub (Jan 29, 2026):

What kind of f*ckery is this!?
It's the year 2026, and stupid Windows can't even copy plain text!?

@fumin commented on GitHub (Jan 29, 2026): What kind of f*ckery is this!? It's the year 2026, and stupid Windows can't even copy plain text!?
Author
Owner

@DHowett commented on GitHub (Jan 29, 2026):

You know, it looks like this bug was filed against the Windows Console Host shortly after line wrapping support even shipped. That's closer to when it shipped broken than it is to today. I'm closing this out - unless somebody can demonstrate it reproducing in Windows Terminal with a shell that actually emits long, and wrappable, lines.

@DHowett commented on GitHub (Jan 29, 2026): You know, it looks like this bug was filed against the Windows Console Host shortly after line wrapping support _even shipped._ That's closer to when it shipped broken than it is to today. I'm closing this out - unless somebody can demonstrate it reproducing in Windows Terminal with a shell that actually emits long, and wrappable, lines.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#256