Mouse Scrolling doesn't scroll main windows but commands #22777

Closed
opened 2026-01-31 08:23:13 +00:00 by claunia · 3 comments
Owner

Originally created by @RieBi on GitHub (Jan 20, 2025).

Windows Terminal version

1.21.3231.0

Windows build number

10.0.22631.0

Other Software

No response

Steps to reproduce

  1. Open terminal
  2. Do some stuff to create history and scroll bar
  3. Wait an hour, a day, a week??
  4. Try to scroll with mouse wheel - it does not work
  5. Try to manually scroll with scroll bar at the right of the screen - it is not visible

Expected Behavior

I am able to scroll the main window (the history log of all stuff) with mouse wheel, and with scrollbar too.

Actual Behavior

I am unable to scroll the main window with mouse wheel, nor am I able to scroll it by controlling the scroll bar, because it is not visible. Pressing at up and down arrows at the respective ends of scrollbar does nothing.

Originally created by @RieBi on GitHub (Jan 20, 2025). ### Windows Terminal version 1.21.3231.0 ### Windows build number 10.0.22631.0 ### Other Software _No response_ ### Steps to reproduce 1. Open terminal 2. Do some stuff to create history and scroll bar 3. Wait an hour, a day, a week?? 4. Try to scroll with mouse wheel - it does not work 5. Try to manually scroll with scroll bar at the right of the screen - it is not visible ### Expected Behavior I am able to scroll the main window (the history log of all stuff) with mouse wheel, and with scrollbar too. ### Actual Behavior I am unable to scroll the main window with mouse wheel, nor am I able to scroll it by controlling the scroll bar, because it is not visible. Pressing at up and down arrows at the respective ends of scrollbar does nothing.
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 08:23:13 +00:00
Author
Owner

@j4james commented on GitHub (Jan 20, 2025):

This sounds like you've run an application that has switched into the alternate screen buffer (this is a mode used by full screen applications which don't have scroll back). That application has possibly then crashed, or shutdown incorrectly, without returning you to the main buffer.

You can fix this by sending the appropriate escape sequence manually. From a bash shell, you can probably just do tput smcup, or more explicitly printf '\e[?1049l'.

From powershell, the equivalent would be echo "`e[?1049l", and in a cmd shell you'd need to type echo , then press Ctrl+[, followed by [?1049l (what you'd see is echo ^[[?1049l).

@j4james commented on GitHub (Jan 20, 2025): This sounds like you've run an application that has switched into the alternate screen buffer (this is a mode used by full screen applications which don't have scroll back). That application has possibly then crashed, or shutdown incorrectly, without returning you to the main buffer. You can fix this by sending the appropriate escape sequence manually. From a bash shell, you can probably just do `tput smcup`, or more explicitly `printf '\e[?1049l'`. From powershell, the equivalent would be ```echo "`e[?1049l"```, and in a cmd shell you'd need to type `echo `, then press <kbd>Ctrl</kbd>+<kbd>[</kbd>, followed by `[?1049l` (what you'd see is `echo ^[[?1049l`).
Author
Owner

@WhatsACloud commented on GitHub (Jan 22, 2025):

Hi @RieBi. Thanks for submitting this issue! Could you clarify how to reproduce the bug by providing the following details?

  1. When did this issue start for your terminal? Was it after running a particular application (eg Vim) that uses an alternate screen buffer?
  2. Does this issue persist after you restart your terminal?
  3. In step 2, is there anything specific to do? I'm running "test" repeatedly in Ubuntu terminal to create a history, but I can scroll just fine up and down after that.
  4. In step 3, you said "wait an hour, a day, or a week". Are you suggesting that after an extended duration of time, the terminal breaks, and this scrolling issue surfaces?

If you have any questions, feel free to ask!

@WhatsACloud commented on GitHub (Jan 22, 2025): Hi @RieBi. Thanks for submitting this issue! Could you clarify how to reproduce the bug by providing the following details? 1. When did this issue start for your terminal? Was it after running a particular application (eg Vim) that uses an alternate screen buffer? 2. Does this issue persist after you restart your terminal? 3. In step 2, is there anything specific to do? I'm running "test" repeatedly in Ubuntu terminal to create a history, but I can scroll just fine up and down after that. 4. In step 3, you said "wait an hour, a day, or a week". Are you suggesting that after an extended duration of time, the terminal breaks, and this scrolling issue surfaces? If you have any questions, feel free to ask!
Author
Owner

@carlos-zamora commented on GitHub (Jan 22, 2025):

Thanks for filing! j4james' comment above is correct. This is an instance of a more general issue of applications leaving the terminal in an unusual or unexpected state. That's unfortunately by design.

@carlos-zamora commented on GitHub (Jan 22, 2025): Thanks for filing! j4james' [comment above](https://github.com/microsoft/terminal/issues/18441#issuecomment-2603258933) is correct. This is an instance of a more general issue of applications leaving the terminal in an unusual or unexpected state. That's unfortunately by design.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22777