Less not clearing on quit #15845

Closed
opened 2026-01-31 04:50:10 +00:00 by claunia · 2 comments
Owner

Originally created by @Sedwin97 on GitHub (Nov 11, 2021).

Windows Terminal version (or Windows build number)

Windows Terminal 1.11.2921.0

Other Software

Using the less command in command prompt and git bash 2.33.0.windows.2 (command git --version in cmd prompt).
I use less to pipe git diff and similar commands into so it doesn't pollute my terminal window.
If I use git-bash.exe outside of Windows Terminal, I do not see this issue.

Steps to reproduce

  1. less <file> with any file larger than the terminal window
  2. scroll
  3. exit less with q
  4. scroll up and you will see text that was in less

This will happen if scrolling by one line or one page (using page down btn or f).

If -c or -C option is added, then scrolling by one page will not have the issue in command prompt but will still happen with git-bash. This doesn't fix scrolling by one line for either.

Expected Behavior

After using less, if I scroll up, I should not see any text that was in less.

Actual Behavior

I do not want to see the file text after using less
image

image

Originally created by @Sedwin97 on GitHub (Nov 11, 2021). ### Windows Terminal version (or Windows build number) Windows Terminal 1.11.2921.0 ### Other Software Using the less command in command prompt and git bash 2.33.0.windows.2 (command git --version in cmd prompt). I use less to pipe `git diff` and similar commands into so it doesn't pollute my terminal window. If I use git-bash.exe outside of Windows Terminal, I do not see this issue. ### Steps to reproduce 1. `less <file>` with any file larger than the terminal window 2. scroll 3. exit less with q 4. scroll up and you will see text that was in less This will happen if scrolling by one line or one page (using page down btn or f). If `-c` or `-C` option is added, then scrolling by one page will not have the issue in command prompt but will still happen with git-bash. This doesn't fix scrolling by one line for either. ### Expected Behavior After using less, if I scroll up, I should not see any text that was in less. ### Actual Behavior I do not want to see the file text after using less ![image](https://user-images.githubusercontent.com/41026527/141333750-6b90939e-4db0-4063-a404-1dce39c917d4.png) ![image](https://user-images.githubusercontent.com/41026527/141333832-4c6a5b93-912d-46a2-95af-60d782cdaf8b.png)
claunia added the Resolution-Duplicate label 2026-01-31 04:50:10 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Nov 11, 2021):

Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #381 for more discussion.

/dup #381

@zadjii-msft commented on GitHub (Nov 11, 2021): Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #381 for more discussion. /dup #381
Author
Owner

@ghost commented on GitHub (Nov 11, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Nov 11, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15845