Skip to content

CLS should reset the virtual viewport bottom #9872

Closed

Description

Windows Terminal version (or Windows build number)

74909c0

Other Software

No response

Steps to reproduce

  1. Make sure you're using a build with PR Prevent the virtual viewport bottom being moved up unintentionally #9770 merged.
  2. Open a conhost cmd shell.
  3. Output some content to fill a few pages of the buffer.
  4. Execute cls.

Expected Behavior

The buffer should be cleared and the viewport should be moved back to the top of the buffer.

Actual Behavior

The buffer is cleared, but the viewport remains where it was before the cls.

I'm afraid I broke this with PR #9770. Previously cls would have reset the virtual bottom when it reset the viewport, but it doesn't do that anymore. And I suspect there are probably more cases like this.

I'm really not sure what the right solution is though - maybe every viewport change made through the console API should reset the virtual bottom? But whatever we do, there are going to be some cases that behave weirdly - I think that's inevitable when you're mixing the legacy APIs with VT.

For now, though, I think it might be a good idea to revert #9770, because this bug seems a lot worse than #9754.

Activity

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

    @DHowett
    Member

    For now, though, I think it might be a good idea to revert #9770, because this bug seems a lot worse than #9754.

    Thanks for this. Sorry for the delay here -- we're getting to the end of a Windows dev cycle and by now you've probably guessed that that tends to eclipse the sun. 😄

    I'll revert 9770 on main.

  4. added a commit that references this issue on Feb 25, 2024
    3809bb5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-VTVirtual Terminal sequence supportNeeds-Tag-FixDoesn't match tag requirementsNeeds-TriageIt's a new issue that the core contributor team needs to triage at the next triage meetingProduct-ConhostFor issues in the Console codebase

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions