Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying wrapped lines includes a newline character #18457

Closed
lindhe opened this issue Jan 24, 2025 · 6 comments
Closed

Copying wrapped lines includes a newline character #18457

lindhe opened this issue Jan 24, 2025 · 6 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@lindhe
Copy link

lindhe commented Jan 24, 2025

Windows Terminal version

1.21.3231.0

Windows build number

10.0.22631.0

Other Software

Ubuntu 24.04.1 LTS (WSL2)

Steps to reproduce

  1. Type a long string, until it wraps at the window width:

    $ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  2. Select the text to copy it.

  3. Paste it, observe the newline introduced at the point of wrapping.

Expected Behavior

Copy the literal string, not the newline.

Actual Behavior

It copies a newline at the point of wrapping. In my example with my particular font and window size, it becomes:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaa
@lindhe lindhe added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jan 24, 2025
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@lindhe
Copy link
Author

lindhe commented Jan 24, 2025

Very similar to #16166

@DHowett
Copy link
Member

DHowett commented Jan 24, 2025

Can you try this again with Preview 1.22/? https://aka.ms/terminal-preview

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 24, 2025
@lindhe
Copy link
Author

lindhe commented Jan 27, 2025

Seems to be working as intended in Preview.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jan 27, 2025
@carlos-zamora
Copy link
Member

Great! Thanks for verifying that! We'll close this as fixed 😊.

@lindhe
Copy link
Author

lindhe commented Jan 30, 2025

Considering this has been a recurring issue, would you consider adding some tests to catch it the next time it happens?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

3 participants