Wraped output contains new line character when copy/paste #17229

Closed
opened 2026-01-31 05:36:04 +00:00 by claunia · 4 comments
Owner

Originally created by @b-hayes on GitHub (Apr 12, 2022).

Windows Terminal version

1.12.10733.0

Windows build number

22000.556

Other Software

WSLv2 with Ubuntu

Steps to reproduce

run any command that outputs a single line too long to fit in the terminal width
copy the wrapped output
paste into an IDE/editor and see that newlines are injected into the output newlines

FYI: I had no problem with this before until I just upgraded to windows 11 from win10 and then updated the Windows terminal app via MS store to the latest version.

Previously I had abandoned other terminals and stopped using built-in ones in IDE's. I relied on Windows terminal because it was the only one that didn't inject newline chars.
But now it does, so I'll have to abandon the windows terminal as well 😢

Expected Behavior

the output to be copied as-is without newlines added.

Actual Behavior

output contains new lines

Originally created by @b-hayes on GitHub (Apr 12, 2022). ### Windows Terminal version 1.12.10733.0 ### Windows build number 22000.556 ### Other Software WSLv2 with Ubuntu ### Steps to reproduce run any command that outputs a single line too long to fit in the terminal width copy the wrapped output paste into an IDE/editor and see that newlines are injected into the output newlines FYI: I had no problem with this before until I just upgraded to windows 11 from win10 and then updated the Windows terminal app via MS store to the latest version. Previously I had abandoned other terminals and stopped using built-in ones in IDE's. I relied on Windows terminal because it was the only one that didn't inject newline chars. But now it does, so I'll have to abandon the windows terminal as well 😢 ### Expected Behavior the output to be copied as-is without newlines added. ### Actual Behavior output contains new lines
claunia added the Needs-TriageIssue-BugNeeds-Tag-Fix labels 2026-01-31 05:36:04 +00:00
Author
Owner

@b-hayes commented on GitHub (Apr 12, 2022):

it was not windows terminal causing this

@b-hayes commented on GitHub (Apr 12, 2022): it was not windows terminal causing this
Author
Owner

@thenger commented on GitHub (Jun 27, 2022):

@b-hayes can you explain what was the problem for me and for future users please ?

@thenger commented on GitHub (Jun 27, 2022): @b-hayes can you explain what was the problem for me and for future users please ?
Author
Owner

@thenger commented on GitHub (Jun 27, 2022):

Okay for some reasons, my settings.json was set like this:

{
    "$help": "https://aka.ms/terminal-documentation",
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "actions": 
    [
        {
            "command": "unbound",
            "keys": "ctrl+v"
        },
        {
            "command": "find",
            "keys": "ctrl+shift+f"
        },
        {
            "command": 
            {
                "action": "copy",
                "singleLine": true
            },
            "keys": "ctrl+c"
        },

And that copy shortcut seems to apply when selecting for copy

I changed to this:

       {
            "command": 
            {
                "action": "copy",
                "singleLine": true
            },
            "keys": "ctrl+c"
        },

According to this https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#clipboard-integration-commands

hth

@thenger commented on GitHub (Jun 27, 2022): Okay for some reasons, my settings.json was set like this: ``` { "$help": "https://aka.ms/terminal-documentation", "$schema": "https://aka.ms/terminal-profiles-schema", "actions": [ { "command": "unbound", "keys": "ctrl+v" }, { "command": "find", "keys": "ctrl+shift+f" }, { "command": { "action": "copy", "singleLine": true }, "keys": "ctrl+c" }, ``` And that copy shortcut seems to apply when selecting for copy I changed to this: ``` { "command": { "action": "copy", "singleLine": true }, "keys": "ctrl+c" }, ``` According to this https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#clipboard-integration-commands hth
Author
Owner

@b-hayes commented on GitHub (Jun 28, 2022):

I honestly can not remember now. Ended up going back to windows 10 for several reasons and never looked back.

@b-hayes commented on GitHub (Jun 28, 2022): I honestly can not remember now. Ended up going back to windows 10 for several reasons and never looked back.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17229