Skip to content

Terminal doesn't translate LF to CR on paste; it only translates CRLF #5821

@riverar

Description

@riverar

Notes from @DHowett-MSFT:

Line ending conversions by other terminals

Clipboard Contains xterm sends wt sends putty sends gnome-terminal sends conhost sends
\r\n (CRLF) \r ✔️ \r ✔️ \r ✔️ \r ✔️ \r ✔️
\r (CR) \r ✔️ \r ✔️ \r ✔️ \r ✔️ \r ✔️
\n (LF) \r ✔️ \n \n \r ✔️ \r ✔️

I guess that means that both of WT and putty are wrong 😄

--- original filing below ---

Environment

Windows 10 10.0.19041.207
Windows Terminal 0.11.1251.0

Steps to reproduce

  1. Open Windows Terminal (Windows PowerShell or PowerShell Core).
  2. Copy all the text in the attached file fake_key.txt.
  3. Paste into Windows Terminal with the mouse.
  4. Observe the lines appear in reverse order.

Expected behavior

Similar behavior to cmd.exe and wsl, in that the pasted lines are in original order and intact.

Actual behavior

Bamboozled. Lines are presented in reverse order.

Screenshots

image

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Help WantedWe encourage anyone to jump in on these.Impact-CorrectnessIt be wrong.Issue-BugIt either shouldn't be doing this or needs an investigation.Priority-3A description (P3)Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions