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

Scrollbar marks for shell integration do not clear when you use clear/cls commands #15426

Closed
Tracked by #15057
The-MAZZTer opened this issue May 24, 2023 · 1 comment · Fixed by #15686
Closed
Tracked by #15057
Assignees
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.

Comments

@The-MAZZTer
Copy link

Windows Terminal version

1.18.1421.0

Windows build number

Version 10.0.22621.1702

Other Software

PowerShell 7.3.4

Steps to reproduce

  1. Enable shell integration as documented here: https://learn.microsoft.com/en-us/windows/terminal/tutorials/shell-integration
  2. Enable PWSH and CMD support (for PWSH I added it to my Documents\PowerShell\Profile.ps1)
  3. Open new PWSH and CMD shells and press enter a bunch of times to generate a bunch of marks.
  4. Type clear in PWSH or cls in CMD
  5. Type commands that generate output like dir
  6. Press Ctrl+Up/Down a bunch

Expected Behavior

The scrollbar marks should disappear on clear/cls and the Ctrl+Up/Down should navigate only through the visible commands

Actual Behavior

The marks remain on the scrollbar and they will still be jumped to even though they are in the middle of command output.

@The-MAZZTer The-MAZZTer 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 May 24, 2023
@zadjii-msft
Copy link
Member

Sure don't. I think this is noted in #11000 but I'll make sure #15057 links this specifically. Thanks!

@zadjii-msft zadjii-msft added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 25, 2023
@zadjii-msft zadjii-msft added this to the Terminal v1.19 milestone May 25, 2023
@zadjii-msft zadjii-msft self-assigned this Jul 10, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR This issue has a related PR label Jul 10, 2023
DHowett pushed a commit that referenced this issue Jul 18, 2023
Move scroll marks to `TextBuffer`, so they can be cleared by
EraseInDisplay and EraseScrollback.

Also removes the namespacing on them.

## References and Relevant Issues
* see also #11000 and #15057
* Resize/Reflow _doesn't_ work yet and I'm not attempting this here. 

## Validation Steps Performed

* `cls` works
* `Clear-Host` works
* `clear` works
* the "Clear buffer" action works
* They work when there's marks above the current viewport, and clear the
scrollback
* they work if you clear multiple "pages" of output, then scroll back to
where marks previously were
* resizing doesn't totally destroy the marks

Closes #15426
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants