microsoft / microsoft/terminal

Clear buffer doesn't clear scroll marks

Open
#20,086 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-TerminalControl Issue-Bug Priority-3 Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

Windows Terminal version

1.24.10921.0

Windows build number

10.0.19045.0

Other Software
  • bash (inside WSL, and with Git for Windows Bash)
  • cmd (Windows Command Prompt)

I'm experiencing this on two other Windows 11 machines, as well.

Steps to reproduce
  • Fill in scroll marks, f.e. by repeated Enter (empty command)

Lots of marks in the scroll bar

  • Press Ctrl+Shift+K (Clear buffer)
Expected Behavior

Scroll marks should be cleared.

Actual Behavior

Scroll marks are not cleared, and they are not updated properly further.

After Ctrl+Shift+K:

After Clear buffer

Repeat empty commands halfway though and issue cls command:

Further 1

Only the marks before the current position get cleared:

Further 2

Next, no new marks appear:

Further 3

until I pass the "stale" marks position and issue cls again.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in Windows Terminal by creating scroll marks with repeated empty commands, pressing Ctrl+Shift+K, and then running cls. Trace the clear-buffer and scroll-mark handling from that behavior; done means all existing marks are removed and new marks continue updating correctly afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.