Terminal pagination breaks after resize #19907

Closed
opened 2026-01-31 06:57:04 +00:00 by claunia · 8 comments
Owner

Originally created by @stkenned-havok on GitHub (May 19, 2023).

Windows Terminal version

1.16.10262.0

Windows build number

10.0.22621.1702

Other Software

git version 2.39.2.windows.1

Steps to reproduce

  • start a terminal
  • run a command which uses a pager e.g. git log
  • Maximize the terminal pane
  • Page down (space) a few pages
  • Terminal goes unresponsive (i.e. the 'less' prompt does not reappear)

Expected Behavior

Scrolling down keeps working normally
Pressing 'q' quits the pager

Actual Behavior

One must interrupt to get the prompt back.
For some reason terminal within vscode cannot be interrupted with keyboard & one must kill the task.
See https://github.com/microsoft/vscode/issues/180406

Originally created by @stkenned-havok on GitHub (May 19, 2023). ### Windows Terminal version 1.16.10262.0 ### Windows build number 10.0.22621.1702 ### Other Software git version 2.39.2.windows.1 ### Steps to reproduce - start a terminal - run a command which uses a pager e.g. git log - Maximize the terminal pane - Page down (space) a few pages - Terminal goes unresponsive (i.e. the 'less' prompt does not reappear) ### Expected Behavior Scrolling down keeps working normally Pressing 'q' quits the pager ### Actual Behavior One must interrupt to get the prompt back. For some reason terminal within vscode cannot be interrupted with keyboard & one must kill the task. See https://github.com/microsoft/vscode/issues/180406
claunia added the Needs-TriageIssue-BugResolution-External labels 2026-01-31 06:57:04 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 19, 2023):

Hmm. I can't seem to repro this on v1.16 with git version 2.33.0.vfs.0.0.

I wonder if this is a regression in the git tooling?

There was #14288 which we duped to #11903, but #11903 is very specifically a Terminal issue, not a conpty one.

If you try to open a conhost.exe window, then set the "screeen buffer size" to be equal to the "window size", does the same thing repro in conhost?
image image

@zadjii-msft commented on GitHub (May 19, 2023): Hmm. I can't seem to repro this on v1.16 with git version 2.33.0.vfs.0.0. I wonder if this is a regression in the git tooling? There was #14288 which we duped to #11903, but #11903 is _very specifically_ a Terminal issue, not a conpty one. If you try to open a `conhost.exe` window, then set the "screeen buffer size" to be equal to the "window size", does the same thing repro in conhost? ![image](https://github.com/microsoft/terminal/assets/18356694/6272c335-5955-49f2-904a-f9e8a03a8d0b) ![image](https://github.com/microsoft/terminal/assets/18356694/556eeedb-c74f-4772-b87b-86c64b177a00)
Author
Owner

@stkenned-havok commented on GitHub (May 19, 2023):

Yes, same behavior with conhost and sizes equal.

image
@stkenned-havok commented on GitHub (May 19, 2023): Yes, same behavior with conhost and sizes equal. <img width="139" alt="image" src="https://github.com/microsoft/terminal/assets/1640758/96fe4198-9c68-4bf6-a564-9aae788fbc54">
Author
Owner

@stkenned-havok commented on GitHub (May 19, 2023):

When I hit this bug, the terminal seems to not fully recover after ctrl+break.
E.g. git by itself is fine. git log seems to be stuck with no output. Same even for exit!
image

#14288 does look like the exact issue I'm seeing. #11903 - well, that's a rather long thread :), I'm not sure.

@stkenned-havok commented on GitHub (May 19, 2023): When I hit this bug, the terminal seems to not fully recover after ctrl+break. E.g. `git` by itself is fine. `git log` seems to be stuck with no output. Same even for `exit`! <img width="73" alt="image" src="https://github.com/microsoft/terminal/assets/1640758/76c27083-719b-45d9-947c-a18b11f8f512"> #14288 does look like the exact issue I'm seeing. #11903 - well, that's a rather long thread :), I'm not sure.
Author
Owner

@zadjii-msft commented on GitHub (May 19, 2023):

same behavior with conhost and sizes equal

👀

That's surely interesting and REALLY makes me think this is a git / msys bug (though, I'd have no idea where to file that)

@zadjii-msft commented on GitHub (May 19, 2023): > same behavior with conhost and sizes equal ### 👀 That's surely interesting and REALLY makes me think this is a git / msys bug (though, I'd have no idea where to file that)
Author
Owner

@carlos-zamora commented on GitHub (Aug 2, 2023):

Looks like this is an issue with the Windows port of "less". We'll raise the issue with the upstream project. Thanks!

@carlos-zamora commented on GitHub (Aug 2, 2023): Looks like this is an issue with the Windows port of "less". We'll raise the issue with the upstream project. Thanks!
Author
Owner

@vimkim commented on GitHub (Oct 3, 2023):

Having the same issue! What a surprise more or less...

-- edit --

turns out I was using git version 2.39.1.windows.1

After upgrading to git version 2.42.0.windows.2 the issue got fixed!

I guess 'less' was the issue as mentioned above.

@vimkim commented on GitHub (Oct 3, 2023): Having the same issue! What a surprise more or less... -- edit -- turns out I was using git version 2.39.1.windows.1 After upgrading to git version 2.42.0.windows.2 the issue got fixed! I guess 'less' was the issue as mentioned above.
Author
Owner

@zadjii-msft commented on GitHub (Oct 3, 2023):

@dqgthb Could you maybe provide any more info? When this got ported out to https://github.com/gwsw/less/issues/411, OP couldn't repro the issue anymore. Are you using the Terminal or conhost? Which version? Which version of less, and how are you running it (basically, is this WSL less, less.exe, git bash less, some less via ssh...)

It might warrant your own issue, since clearly whatever was at the root of OP's issue was transient, and we might not want to cross-pollute your bug report with the one from OP.

@zadjii-msft commented on GitHub (Oct 3, 2023): @dqgthb Could you maybe provide any more info? When this got ported out to https://github.com/gwsw/less/issues/411, OP couldn't repro the issue anymore. Are you using the Terminal or conhost? Which version? Which version of `less`, and how are you running it (basically, is this WSL `less`, `less.exe`, git bash `less`, some `less` via ssh...) It might warrant your own issue, since clearly whatever was at the root of OP's issue was transient, and we might not want to cross-pollute your bug report with the one from OP.
Author
Owner

@vimkim commented on GitHub (Oct 3, 2023):

@zadjii-msft thank you so much for your quick support!
I just edited my original answer. Upgrading git solved the issue 💯

Just to answer your question for the future reference,

  • windows terminal
  • Powershell 5 and 7 both had the issue
  • Ubuntu wsl git log --graph did not have the issue

which all makes sense now.

@vimkim commented on GitHub (Oct 3, 2023): @zadjii-msft thank you so much for your quick support! I just edited my original answer. Upgrading git solved the issue 💯 Just to answer your question for the future reference, - windows terminal - Powershell 5 and 7 both had the issue - Ubuntu wsl git log --graph did not have the issue which all makes sense now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19907