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

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

Closed
b-hayes opened this issue Apr 12, 2022 · 4 comments
Closed

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

b-hayes opened this issue Apr 12, 2022 · 4 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@b-hayes
Copy link

b-hayes commented 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

@b-hayes b-hayes added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Apr 12, 2022
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Apr 12, 2022
@b-hayes
Copy link
Author

b-hayes commented Apr 12, 2022

it was not windows terminal causing this

@b-hayes b-hayes closed this as completed Apr 12, 2022
@thenger
Copy link

thenger commented Jun 27, 2022

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

@thenger
Copy link

thenger commented 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

@b-hayes
Copy link
Author

b-hayes commented Jun 28, 2022

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

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-Tag-Fix Doesn't match tag requirements 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

2 participants