Skip to content

[REGR #3956] Terminal incorrectly splits part of escape sequence #4131

Closed

Description

@Sidneys1

Environment

Windows build number: 10.0.19041.0
Windows Terminal version (if applicable): Dev build @ 4882917
    Fix flipped sense in TerminalDispatch::CursorPosition (#4113)

Any other software?

PowerShell: 7.0.0-rc.1 and PowerShell 6.1.3
oh-my-posh: 2.0.342

Steps to reproduce

# Start powershell

# Install posh-git from the gallery
Install-Module posh-git -Scope CurrentUser

# Install oh-my-posh from the gallery, enter Y or A at the prompt
Install-Module oh-my-posh -Scope CurrentUser

# Load the oh-my-posh module
Import-Module oh-my-posh

# Set the theme to Paradox
Set-Theme Paradox

Expected behavior

Prompt is printed cleanly (as seen in the store release v0.7.3451.0):

image

Actual behavior

Right-most character of prompt is cut off (see timestamp) and part of an escape sequence has bled back to the beginning of the line (see "97ms"):

image

The existing prompt corrects itself after resizing the window, but subsequent prompts repeat the behavior:

image

This happens at any buffer size

Related Issues

Possibly related to #4037 (seems to be splitting an escape sequence) and/or #635 (although the "snap back" behavior is not exhibited)?

Activity

  1. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jan 7, 2020
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Jan 7, 2020
  3. DHowett-MSFT commented on Jan 7, 2020

    @DHowett-MSFT
    Contributor

    So, this regressed between 0.7 and 0.8? That's not great. Neither 4037 nor 635 should have changed behavior since 0.7. This may have been related to #4005.

  4. DHowett-MSFT commented on Jan 7, 2020

    @DHowett-MSFT
    Contributor

    If you set your startup project to Host.EXE (this is just traditional conhost), does the issue still reproduce?

  5. Sidneys1 commented on Jan 7, 2020

    @Sidneys1
    Author
  6. Sidneys1 commented on Jan 8, 2020

    @Sidneys1
    Author

    If you set your startup project to Host.EXE (this is just traditional conhost), does the issue still reproduce?

    It does not appear to, even when changing the font to match (Cascadia Code PL):

    image

  7. Sidneys1 commented on Jan 8, 2020

    @Sidneys1
    Author

    Additionally, an older build (e294e66) on a different computer does not exhibit the same behavior. There was a different font being used, but copying the font to the computer with the problem and using it did not fix the problem...

    I'm running git bisect now to see where things go wrong :)

  8. Sidneys1 commented on Jan 8, 2020

    @Sidneys1
    Author

    Bisect confirmed the faulty commit is #3956 :( Lots of changes to sift through...

    Edit: and it looks like the source branch is deleted, so I can't bisect the individual commits there :(

  9. zadjii-msft commented on Jan 8, 2020

    @zadjii-msft
    Member

    Sidneys1 (@Sidneys1) by any chance, does #4125 fix this for you?

    git fetch origin pull/4125/head:pull/4125 && git checkout pull/4125
    

    should check out the PR

  10. Sidneys1 commented on Jan 8, 2020

    @Sidneys1
    Author

    Sidneys1 (@Sidneys1) by any chance, does #4125 fix this for you?

    ...yes.... and also no. It fixes the original issue, and introduces a lot more:

    WxA2FFV785

    Looks like a lot of characters are being duplicated when typing, and clear put the prompt at the bottom of the visible buffer instead of the top...

  11. Sidneys1 commented on Jan 8, 2020

    @Sidneys1
    Author

    As you can see though the duplication is only visual, the commands run as typed.

  12. zadjii-msft commented on Jan 8, 2020

    @zadjii-msft
    Member

    Woah that's maybe not so good 😅 Michael Niksa (@miniksa) for visibility

  13. changed the title [-]Terminal incorrectly splits part of escape sequence[/-] [+][REGR #3956] Terminal incorrectly splits part of escape sequence[/+] on Jan 8, 2020
  14. miniksa commented on Jan 8, 2020

    @miniksa
    Contributor

    Hnnn ok.

  15. 9 remaining items

  16. removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jan 8, 2020
  17. Sidneys1 commented on Jan 8, 2020

    @Sidneys1
    Author

    My biggest problem right now is now I have to go learn how the hell to install oh-my-posh. The repro steps leave something to be desired...

    All, good :) Your best bet is:

    # Start powershell
    Install-Module oh-my-posh -Scope CurrentUser
    # Enter Y or A at the prompt
    Import-Module oh-my-posh
    Set-Theme Paradox
  18. miniksa commented on Jan 8, 2020

    @miniksa
    Contributor

    Thanks. However, I just launched straight up Powershell in my 4116 branch and it's totally toasted so I'm going to guess it's related.

  19. Sidneys1 commented on Jan 8, 2020

    @Sidneys1
    Author

    Updated the ticket itself with better reproduction steps.

    Eventually if I have time I'll isolate the exact sequence that triggers the bug so you can reproduce without oh-my-posh.

  20. miniksa commented on Jan 8, 2020

    @miniksa
    Contributor

    I hope to figure it out today. Stay tuned.

  21. miniksa commented on Jan 8, 2020

    @miniksa
    Contributor

    master merged into 4116 seems to resolve both visible behaviors:

    1. the messed up right edge
    2. the reprinting of the text over and over.

    I'm going to guess #4107 whose fix was committed yesterday was also contributing here.

  22. miniksa commented on Jan 8, 2020

    @miniksa
    Contributor

    Sidneys1 (@Sidneys1), everything seems fine now that I merged master into dev/miniksa/4116. So I think I might resolve this as a duplicate to 4116/4125.

  23. Sidneys1 commented on Jan 8, 2020

    @Sidneys1
    Author

    Confirmed that dev/miniska/4116 @ 1ff0037 fixes both problems for me.

  24. miniksa commented on Jan 8, 2020

    @miniksa
    Contributor

    Excellent, thanks. Sorry about that.

  25. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Jan 8, 2020
  26. miniksa commented on Jan 8, 2020

    @miniksa
    Contributor

    /dup #4116

  27. ghost added
    Resolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.
    on Jan 8, 2020
  28. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-VTVirtual Terminal sequence supportIssue-BugIt either shouldn't be doing this or needs an investigation.Product-ConptyFor console issues specifically related to conptyResolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.Severity-BlockingWe won't ship a release like this! No-siree.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions