copy paste with multiple lines doesnt skip spaces and insert new line at the end of each line #3972

Closed
opened 2026-01-30 23:34:41 +00:00 by claunia · 2 comments
Owner

Originally created by @bruceljyang on GitHub (Sep 21, 2019).

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.295]
Windows Terminal version (if applicable): Version: 0.4.2382.0

Any other software?

Steps to reproduce

say we have
"
Line 1
Line 2
Line 3
"
on screen.
use Mouse to select multiple lines in the windows terminal and right click (or ctrl + c). Then paste it into either a text editor such as sublime in windows or paste back into the terminal using right click again.

all the lines become one line with lots of spaces adding in between. such as
"Line 1 SPACE SPACE SPACE SPACE SPACE SPACE Line 2 SPACE SPACE SPACE SPACE SPACE SPACE SPACE SPACE SPACE Line 3 "

Expected behavior

The right output should be
"
Line 1\newline
Line 2\newline
Line 3\newline
"

This makes it really really hard to use windows terminal, since we do need to copy and paste multiple lines a lot. Say people ask you send them your stuffs in some linux env, you open the file, then you want to just be able to select lines and copy them, then paste into an email/chat app in windows. Now, all lines are becoming just one line, which is bad..

Actual behavior

all the lines become one line with lots of spaces adding in between. such as
"Line 1 SPACE SPACE SPACE SPACE SPACE SPACE Line 2 SPACE SPACE SPACE SPACE SPACE SPACE SPACE SPACE SPACE Line 3 "

Originally created by @bruceljyang on GitHub (Sep 21, 2019). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18362.295] Windows Terminal version (if applicable): Version: 0.4.2382.0 Any other software? ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> say we have " Line 1 Line 2 Line 3 " on screen. use Mouse to select multiple lines in the windows terminal and right click (or ctrl + c). Then paste it into either a text editor such as sublime in windows or paste back into the terminal using right click again. all the lines become one line with lots of spaces adding in between. such as "Line 1 SPACE SPACE SPACE SPACE SPACE SPACE Line 2 SPACE SPACE SPACE SPACE SPACE SPACE SPACE SPACE SPACE Line 3 " # Expected behavior The right output should be " Line 1\newline Line 2\newline Line 3\newline " This makes it really really hard to use windows terminal, since we do need to copy and paste multiple lines a lot. Say people ask you send them your stuffs in some linux env, you open the file, then you want to just be able to select lines and copy them, then paste into an email/chat app in windows. Now, all lines are becoming just one line, which is bad.. <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> # Actual behavior <!-- What's actually happening? --> all the lines become one line with lots of spaces adding in between. such as "Line 1 SPACE SPACE SPACE SPACE SPACE SPACE Line 2 SPACE SPACE SPACE SPACE SPACE SPACE SPACE SPACE SPACE Line 3 "
claunia added the Resolution-Duplicate label 2026-01-30 23:34:41 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 23, 2019):

/dup #2275

@DHowett-MSFT commented on GitHub (Sep 23, 2019): /dup #2275
Author
Owner

@ghost commented on GitHub (Sep 23, 2019):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Sep 23, 2019): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3972