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

Window Terminal sporadically fails to trim trailing white spaces. #17857

Open
jeffpkamp opened this issue Sep 4, 2024 · 6 comments
Open

Window Terminal sporadically fails to trim trailing white spaces. #17857

jeffpkamp opened this issue Sep 4, 2024 · 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

@jeffpkamp
Copy link

Windows Terminal version

1.20.11781.0

Windows build number

10.0.19043 Build 19043

Other Software

This happens no matter where I am copying from.

Steps to reproduce

Open terminal, copy and paste into a new terminal window. The behavior is sporadic, but happens with often. It makes it very hard to work in the terminal.

Expected Behavior

pasted text will have the excess white space at the end of the line removed

Actual Behavior

pasted text is treated like it was a single line that wrapped around, leading to long white spaces and no line breaks.

Behavior is sporadic. The problem is on the copy window side.

Example: Below data was copied and pasted. Some of the white space is removed, some is not.

                                                                                                                               secondary={}                                                                                                                      r=requests.get(HTML).content.decode().split("\n")                                                                                 for x in r[1:]:
    if x:
        if "NONE" not in x:
            x=re.split("[\t ]",x)
            pos=x[0].replace("_"," ")
            if pos not in secondary:
                secondary[pos]=set()
            for v in x[1:]:
                if "(" not in v:
                    secondary[pos]=secondary[pos]|set([v])

I add a few newlines above the text and now it copies correctly, but this is not a consistent fix

secondary={}
r=requests.get(HTML).content.decode().split("\n")
for x in r[1:]:
    if x:
        if "NONE" not in x:
            x=re.split("[\t ]",x)
            pos=x[0].replace("_"," ")
            if pos not in secondary:
                secondary[pos]=set()
            for v in x[1:]:
                if "(" not in v:
                    secondary[pos]=secondary[pos]|set([v])
@jeffpkamp jeffpkamp 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 Sep 4, 2024
@jeffpkamp
Copy link
Author

Sorry, just noted this behavior. Sometimes it puts a newline in where the line wraps.

@zadjii-msft
Copy link
Member

Does this repro on 1.22/?

https://github.com/microsoft/terminal/releases/tag/v1.22.2362.0

@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 Sep 4, 2024
@jeffpkamp
Copy link
Author

Got it installed. Give me a few days to test it out and see if the buggy behavior appears

@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 Sep 4, 2024
@zadjii-msft zadjii-msft added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Sep 5, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Sep 9, 2024
@jeffpkamp
Copy link
Author

It has worked correctly on the new version for a few days now. I am now testing it out on a different computer just to make sure.

@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 No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Sep 9, 2024
@jeffpkamp
Copy link
Author

I am still seeing the inappropriate pasting behavior on the new computer I am using it on.

@jeffpkamp
Copy link
Author

I can confirm I am still seeing the issue on the original computer with the new release of the terminal.

I should also note that sometimes I can get it to stop by doing things like resizing the window? Doesn't always work, but sometimes it does.

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

2 participants