Skip to content

When Copying, Line Wrapped Text Is Inconsistently Broken Into Multiple Lines #6901

@ghost

Description

Environment

Platform = Win32NT
Version = 10.0.19041.0
Version String = Microsoft Windows NT 10.0.19041.0
Windows Terminal Version = 1.0.1811.0
SSH Version = OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
WSL Version = 2

Steps to reproduce

  1. SSH into any linux server or open a WSL tab (My testing specifically used an SSH session).
  2. create a file called 'test.txt' containing a line long enough to wrap twice with the last wrap having just a few characters.
  3. Use more test.txt to list the contents of the create file.
  4. Copy the output and paste it into notepad/notepad++
  5. Resize the Terminal Window (you can resize and then put it back to the same size)
  6. Copy the output again and paste it into notepad/notepad++

The 'more' command was the easiest way to get a reproducible result but I have seen this behavior with many other Linux programs some inconsistently and some consistently.

Expected behavior

Pasted text should be a single line, for both steps 4 and 6, as the copied output was wrapped by the terminal and not broken into separate lines by the output program.

Actual behavior

For step 4, the single line gets broken into multiple lines depending on the size or your terminal and how many lines the text got wrapped into. Then on step 6, the line is correctly copied as a single line.

image

settings.json.txt

Possible related to #5113 but was directed to create new issuel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)In-PRThis issue has a related PRIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-ReproWe can't figure out how to make this happen. Please help find a simplified repro.Needs-Tag-FixDoesn't match tag requirementsPriority-2A description (P2)Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions