Shift+Click plus copyOnSelect drops newlines :( #6639

Closed
opened 2026-01-31 00:43:38 +00:00 by claunia · 3 comments
Owner

Originally created by @nortakales on GitHub (Feb 27, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.657]
Windows Terminal version (if applicable): Version: 0.9.433.0

Steps to reproduce

  1. Select some text
  2. Shift + Click to select more text across multiple terminal lines (this is the important step, clicking and dragging to select does NOT produce the same effect).
  3. Copy (if you have copy on select enabled this is done automatically)
  4. Paste into any text editor

Expected behavior

If this was the text that was selected:

C:\Users\nicholao>
C:\Users\nicholao>
C:\Users\nicholao>
C:\Users\nicholao>
C:\Users\nicholao>

this should be pasted:

C:\Users\nicholao>
C:\Users\nicholao>
C:\Users\nicholao>
C:\Users\nicholao>
C:\Users\nicholao>

Actual behavior

Width of terminal determines how much white space is between each line, and there are no newlines present in the pasted content:

C:\Users\nicholao>                                                                   C:\Users\nicholao>                                                                   C:\Users\nicholao>                                                                   C:\Users\nicholao>                                                                   C:\Users\nicholao>
Originally created by @nortakales on GitHub (Feb 27, 2020). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18362.657] Windows Terminal version (if applicable): Version: 0.9.433.0 ``` # Steps to reproduce 1. Select some text 2. Shift + Click to select more text across multiple terminal lines (this is the important step, clicking and dragging to select does NOT produce the same effect). 3. Copy (if you have copy on select enabled this is done automatically) 4. Paste into any text editor # Expected behavior If this was the text that was selected: ``` C:\Users\nicholao> C:\Users\nicholao> C:\Users\nicholao> C:\Users\nicholao> C:\Users\nicholao> ``` this should be pasted: ``` C:\Users\nicholao> C:\Users\nicholao> C:\Users\nicholao> C:\Users\nicholao> C:\Users\nicholao> ``` # Actual behavior Width of terminal determines how much white space is between each line, and there are no newlines present in the pasted content: ``` C:\Users\nicholao> C:\Users\nicholao> C:\Users\nicholao> C:\Users\nicholao> C:\Users\nicholao> ```
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 27, 2020):

This is likely because..

2f60cf0e91/src/cascadia/TerminalControl/TermControl.cpp (L980)
2f60cf0e91/src/cascadia/TerminalControl/TermControl.cpp (L988)

"shift" is being held down during the pointer release, which triggers "no newlines" mode. hm.

@DHowett-MSFT commented on GitHub (Feb 27, 2020): This is likely because.. https://github.com/microsoft/terminal/blob/2f60cf0e9138f0d788f0a7bf189ee4116a701a4d/src/cascadia/TerminalControl/TermControl.cpp#L980 https://github.com/microsoft/terminal/blob/2f60cf0e9138f0d788f0a7bf189ee4116a701a4d/src/cascadia/TerminalControl/TermControl.cpp#L988 "shift" is being held down during the pointer release, which triggers "no newlines" mode. hm.
Author
Owner

@nortakales commented on GitHub (Apr 8, 2020):

For anyone else that comes across this issue right now, there is a work around: release Shift before releasing your mouse button. As long as you can consciously remember to do things in that order, you can preserve newlines.

@nortakales commented on GitHub (Apr 8, 2020): For anyone else that comes across this issue right now, there is a work around: release Shift before releasing your mouse button. As long as you can consciously remember to do things in that order, you can preserve newlines.
Author
Owner

@ghost commented on GitHub (Apr 22, 2020):

:tada:This issue was addressed in #5346, which has now been successfully released as Windows Terminal Preview v0.11.1121.0.🎉

Handy links:

@ghost commented on GitHub (Apr 22, 2020): :tada:This issue was addressed in #5346, which has now been successfully released as `Windows Terminal Preview v0.11.1121.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.11.1121.0) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6639