-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for alternate scroll mode in Terminal #12569
Conversation
Resizing is surely boned but this is 1000% percent better than nothing at all.
_⚠️ targets #12561⚠️ _ "Alternate scroll mode" is a neat little mode where the app wants mouse wheel events to come through as arrow keypresses instead, when in the alternate buffer. Now that we've got support for the alt buffer in the Terminal, we can support this as well. * [x] Closes #3321 * [x] I work here * [ ] Tests would be nice Tested manually with ```bash printf "\e[?1007h" ; man ps ```
@check-spelling-bot ReportUnrecognized words, please review:
Previously acknowledged words that are now absentazurewebsites cxcy debolden deconstructed devicefamily guardxfg LLVM MSDL ned NOWAIT pgorepro pgort PGU Timeline timelines unintense WResult xfgTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the [email protected]:microsoft/terminal.git repository
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉 🗜️ If you see a bunch of garbageIf it relates to a ... well-formed patternSee if there's a pattern that would match it. If not, try writing one and adding it to a Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines. Note that patterns can't match multiline strings. binary-ish stringPlease add a file path to the File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
|
…f that we're supposed to do when entering/exiting the alt buffer
…t worked" because conpty magic.
…1-altscroll-in-terminal
@check-spelling-bot ReportUnrecognized words, please review:
Previously acknowledged words that are now absentazurewebsites cxcy debolden deconstructed devicefamily guardxfg LLVM MSDL ned NOWAIT pgorepro pgort PGU redistributable Timeline timelines unintense WResult xfgTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the [email protected]:microsoft/terminal.git repository
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉 🗜️ If you see a bunch of garbageIf it relates to a ... well-formed patternSee if there's a pattern that would match it. If not, try writing one and adding it to a Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines. Note that patterns can't match multiline strings. binary-ish stringPlease add a file path to the File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
@@ -615,6 +615,10 @@ void Terminal::UseAlternateScreenBuffer() | |||
// update all the hyperlinks on the screen | |||
UpdatePatternsUnderLock(); | |||
|
|||
// GH#3321: Make sure we let the TerminalInput know that we switched | |||
// buffers. This might affect how we interpret certain mouse events. | |||
_terminalInput->UseAlternateScreenBuffer(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO this part belongs in the original alt buffer PR -- since UseAlternateScreenBuffer
isn't new.
…ie/b/3321-altscroll-in-terminal
…scroll-in-terminal
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
"Alternate scroll mode" is a neat little mode where the app wants mouse wheel events to come through as arrow keypresses instead, when in the alternate buffer. Now that we've got support for the alt buffer in the Terminal, we can support this as well.
Tested manually with