scrolling in emacs scrolls the screen, not emacs buffer #13090

Closed
opened 2026-01-31 03:33:34 +00:00 by claunia · 11 comments
Owner

Originally created by @tsengalb99 on GitHub (Mar 19, 2021).

In linux terminals (gnome terminal, konsole, termux, etc.), scrolling in an emacs window moves the cursor, not the actual output. Currently (version 1.6.10571.0), scroll behavior in Windows Terminal appears to be captured by the terminal and not passed on to the application, as it should. I am almost certain this is an issue with Terminal since MinTTY handles scrolling fine with GitBash, but Terminal does not.

Will this be fixed (when I last used windows terminal half a year ago, I noticed this problem), and if so, when?

Originally created by @tsengalb99 on GitHub (Mar 19, 2021). In linux terminals (gnome terminal, konsole, termux, etc.), scrolling in an emacs window moves the cursor, not the actual output. Currently (version 1.6.10571.0), scroll behavior in Windows Terminal appears to be captured by the terminal and not passed on to the application, as it should. I am almost certain this is an issue with Terminal since MinTTY handles scrolling fine with GitBash, but Terminal does not. Will this be fixed (when I last used windows terminal half a year ago, I noticed this problem), and if so, when?
claunia added the Resolution-Duplicate label 2026-01-31 03:33:34 +00:00
Author
Owner

@skyline75489 commented on GitHub (Mar 19, 2021):

what version of emacs are you using? Are you using WSL? Are you using SSH?

@skyline75489 commented on GitHub (Mar 19, 2021): what version of emacs are you using? Are you using WSL? Are you using SSH?
Author
Owner

@skyline75489 commented on GitHub (Mar 19, 2021):

It's a bit complicated, but although MinTTY (GitBash) looks like Terminal, the underlying tech stacks are very different.

@skyline75489 commented on GitHub (Mar 19, 2021): It's a bit complicated, but although MinTTY (GitBash) looks like Terminal, the underlying tech stacks are very different.
Author
Owner

@tsengalb99 commented on GitHub (Mar 19, 2021):

ssh to an ubuntu machine, emacs 25.2.2, but the version of emacs does not seem to make a difference (tried this on multiple machines)

@tsengalb99 commented on GitHub (Mar 19, 2021): ssh to an ubuntu machine, emacs 25.2.2, but the version of emacs does not seem to make a difference (tried this on multiple machines)
Author
Owner

@skyline75489 commented on GitHub (Mar 19, 2021):

OK that makes sense. I know it sounds easy, there's actually a lot of things that need to be fixed, OpenSSH on Windows being an example. See https://github.com/microsoft/terminal/issues/8528#issuecomment-741544578 .

You can try the newer version of OpenSSH in Win32-OpenSSH repo.

@skyline75489 commented on GitHub (Mar 19, 2021): OK that makes sense. I know it sounds easy, there's actually a lot of things that need to be fixed, OpenSSH on Windows being an example. See https://github.com/microsoft/terminal/issues/8528#issuecomment-741544578 . You can try the newer version of OpenSSH in [Win32-OpenSSH repo](https://github.com/PowerShell/Win32-OpenSSH).
Author
Owner

@tsengalb99 commented on GitHub (Mar 19, 2021):

I installed the newer version of openssh, but the cursor still doesn't scroll. The screen stops scrolling, which is nice, but the cursor is still stuck.

@tsengalb99 commented on GitHub (Mar 19, 2021): I installed the newer version of openssh, but the cursor still doesn't scroll. The screen stops scrolling, which is nice, but the cursor is still stuck.
Author
Owner

@tsengalb99 commented on GitHub (Mar 19, 2021):

Also, it doesnt completely make sense to me why openssh on windows would be the issue. Git Bash ships with its own version of ssh (presumably also openssh), which works fine in mintty but not windows terminal. Doesn't this imply terminal's handling of scrolling and ssh is wonky? Mintty seems to handle it just fine.

@tsengalb99 commented on GitHub (Mar 19, 2021): Also, it doesnt completely make sense to me why openssh on windows would be the issue. Git Bash ships with its own version of ssh (presumably also openssh), which works fine in mintty but not windows terminal. Doesn't this imply terminal's handling of scrolling and ssh is wonky? Mintty seems to handle it just fine.
Author
Owner

@skyline75489 commented on GitHub (Mar 19, 2021):

You see, the MinTTY (together with its openssh) runs inside MSYS, which is kind of a minimal Linux environment on Windows. But the Win32-OpenSSH you're using is a native version of OpenSSH running on Windows. These two versions of OpenSSH are mostly the same, but remarkably different about how they interact with terminals. That's why you may find the SSH shipped with Git Bash is not working inside Windows Terminal. I don't want to bore you with all the technical details. The conclusion is that, the entire terminal ecosystem on Windows is not (yet) as complete as Linux. MSYS was the "old" solution that simulate what Linux does on Windows. Windows Terminal is the new kid in town.

@skyline75489 commented on GitHub (Mar 19, 2021): You see, the MinTTY (together with its openssh) runs inside MSYS, which is kind of a minimal Linux environment on Windows. But the Win32-OpenSSH you're using is a *native* version of OpenSSH running on Windows. These two versions of OpenSSH are mostly the same, but remarkably different about how they interact with *terminals*. That's why you may find the SSH shipped with Git Bash is not working inside Windows Terminal. I don't want to bore you with all the technical details. The conclusion is that, the entire terminal ecosystem on Windows is not (yet) as complete as Linux. MSYS was the "old" solution that simulate what Linux does on Windows. Windows Terminal is the new kid in town.
Author
Owner

@tsengalb99 commented on GitHub (Mar 19, 2021):

Interesting. How would I go about getting functioning scroll behavior then? It appears that the latest openssh still doesn't handle scrolling correctly.

I would use mintty except it doesn't offer tabs, and the other features of windows terminal are useful too.

@tsengalb99 commented on GitHub (Mar 19, 2021): Interesting. How would I go about getting functioning scroll behavior then? It appears that the latest openssh still doesn't handle scrolling correctly. I would use mintty except it doesn't offer tabs, and the other features of windows terminal are useful too.
Author
Owner

@skyline75489 commented on GitHub (Mar 19, 2021):

I wish I could help but I'm a Vim user. And I don't know the SSH side of the story that well. Please be patient and wait for the response from the core developers of this project.

I know it sounds a simple issue that should be solved a long time ago. But trust me, most what you see is just the tip of an iceberg. Take a look at the 1200+ issues in this repo and you'll know what I mean. As a terminal project, Windows Terminal is actually very young (six years old roughly?), comparing to GNOME terminals and alike, which is like 20+ years old. And Windows is fundamentally different than *nix in so many ways. So please keep calm & have a little patience 😃

@skyline75489 commented on GitHub (Mar 19, 2021): I wish I could help but I'm a Vim user. And I don't know the SSH side of the story that well. Please be patient and wait for the response from the core developers of this project. I know it sounds a simple issue that should be solved a long time ago. But trust me, most what you see is just the tip of an iceberg. Take a look at the 1200+ issues in this repo and you'll know what I mean. As a terminal project, Windows Terminal is actually very young (six years old roughly?), comparing to GNOME terminals and alike, which is like 20+ years old. And Windows is fundamentally different than *nix in so many ways. So please keep calm & have a little patience 😃
Author
Owner

@zadjii-msft commented on GitHub (Mar 19, 2021):

This sounds a lot like #9534. I think at the end of the day, this is caused by the Terminal not properly supporting the alternate screen buffer.

/dup #381
/dup #3321

@zadjii-msft commented on GitHub (Mar 19, 2021): This sounds a lot like #9534. I think at the end of the day, this is caused by the Terminal not properly supporting the alternate screen buffer. /dup #381 /dup #3321
Author
Owner

@ghost commented on GitHub (Mar 19, 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 (Mar 19, 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#13090