Rectangular select copies trailing spaces #13299

Open
opened 2026-01-31 03:39:10 +00:00 by claunia · 0 comments
Owner

Originally created by @randomascii on GitHub (Apr 5, 2021).

Originally assigned to: @Don-Vito on GitHub.

Windows Terminal version (or Windows build number)

1.6.10571.0

Other Software

No response

Steps to reproduce

When doing a rectangular copy of text Windows Terminal copies trailing spaces. If the different lines being copied are of different lengths then this means the clipboard contents end up with varying numbers of spaces. Cleaning this up is a nuisance. Trailing spaces are rarely desirable when pasting text. For instance, if the terminal contained this text:

1: blah blah blah Column 3
2: foo Column 3

then I might want to copy the first two columns of data ("1: blah blah blah" and the subsequent data below or perhaps just the second column of data ("blah blah blah" and the subsequent data below) but I (personally), never want to copy the trailing spaces. I think that this is a change of behavior. I think it is a regression. It is certainly a change from cmd.exe, and not a welcome one.

Expected Behavior

No trailing spaces copied to the clipboard.

Actual Behavior

Trailing spaces copied to the clipboard.

Originally created by @randomascii on GitHub (Apr 5, 2021). Originally assigned to: @Don-Vito on GitHub. ### Windows Terminal version (or Windows build number) 1.6.10571.0 ### Other Software _No response_ ### Steps to reproduce When doing a rectangular copy of text Windows Terminal copies trailing spaces. If the different lines being copied are of different lengths then this means the clipboard contents end up with varying numbers of spaces. Cleaning this up is a nuisance. Trailing spaces are rarely desirable when pasting text. For instance, if the terminal contained this text: 1: blah blah blah Column 3 2: foo Column 3 then I might want to copy the first two columns of data ("1: blah blah blah" and the subsequent data below or perhaps just the second column of data ("blah blah blah" and the subsequent data below) but I (personally), never want to copy the trailing spaces. I think that this is a change of behavior. I think it is a regression. It is certainly a change from cmd.exe, and not a welcome one. ### Expected Behavior No trailing spaces copied to the clipboard. ### Actual Behavior Trailing spaces copied to the clipboard.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13299