-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Clamp the terminal buffer to SHRT_MAX
on resize
#4964
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Summary of the Pull Request This is 100% on me. Even after mucking around in this function for the last 3 months, I missed that there was a single addition where we weren't doing a clamped addition. This would lead to us creating a buffer with negative height, and all sorts of badness. Clamping this addition was enoguh to fix the bug. ## PR Checklist * [x] Closes #2815 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated ## Validation Steps Performed * ran tests * Created a profile with `"historySize" : 32728`, then filled the viewport with text, then maximized, and saw that the viewport indeed did resize to the new size of the window.
zadjii-msft
added
Area-Output
Related to output processing (inserting text into buffer, retrieving buffer text, etc.)
Area-TerminalControl
Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)
Product-Terminal
The new Windows Terminal.
labels
Mar 17, 2020
DHowett-MSFT
approved these changes
Mar 17, 2020
This was referenced Mar 18, 2020
carlos-zamora
approved these changes
Mar 18, 2020
3 tasks
zadjii-msft
added
the
AutoMerge
Marked for automatic merge by the bot when requirements are met
label
Mar 18, 2020
Hello @zadjii-msft! 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 (
|
ghost
deleted the
dev/migrie/b/2815-resize-SHRT_MAX
branch
March 18, 2020 22:22
DHowett-MSFT
pushed a commit
that referenced
this pull request
Mar 19, 2020
## Summary of the Pull Request This is 100% on me. Even after mucking around in this function for the last 3 months, I missed that there was a single addition where we weren't doing a clamped addition. This would lead to us creating a buffer with negative height, and all sorts of badness. Clamping this addition was enough to fix the bug. ## PR Checklist * [x] Closes #2815 * [x] Closes #4972 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated ## Validation Steps Performed * ran tests * Created a profile with `"historySize" : 32728`, then filled the viewport with text, then maximized, and saw that the viewport indeed did resize to the new size of the window. (cherry picked from commit f221cd2)
🎉 Handy links: |
ghost
mentioned this pull request
Mar 20, 2020
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-Output
Related to output processing (inserting text into buffer, retrieving buffer text, etc.)
Area-TerminalControl
Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)
AutoMerge
Marked for automatic merge by the bot when requirements are met
Needs-Second
It's a PR that needs another sign-off
Product-Terminal
The new Windows Terminal.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
This is 100% on me. Even after mucking around in this function for the last 3
months, I missed that there was a single addition where we weren't doing a
clamped addition. This would lead to us creating a buffer with negative height,
and all sorts of badness.
Clamping this addition was enough to fix the bug.
PR Checklist
Validation Steps Performed
"historySize" : 32728
, then filled the viewport withtext, then maximized, and saw that the viewport indeed did resize to the new
size of the window.