-
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
wpf: add width/height checks when resizing the terminal #7983
Conversation
Looks like you are using a fork prior to Super Linter getting added. Can you rebase/merge master to your fork? |
Because of the conflict, Javier will need to merge master anyway. Be aware though: the linter doesn't lint C# files, and we use stylecop for that. |
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.
Does resizing to (0,0) cause the crashes, or does resizing to 0 in either dimension (i.e. (w,0) or (0,h)) also cause a crash?
@zadjii-msft I haven't tested (0, #) but when set to (0,0) it crashes VS since an unhandled exception is raised in the native side. We've added guards for this on the VS side but I thought we'd do it here as well. |
throw new ArgumentException(nameof(renderSize), "Terminal column or row count cannot be 0."); | ||
} | ||
|
||
var dpiScale = VisualTreeHelper.GetDpi(this); |
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.
i don't see why we need this line..
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.
Looks like it came from a bad merge. Pushing a fix...
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.
Just the one question
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 (
|
We are getting some watson crash reports that the terminal is attempting to resize to `(0, 0)`. This change makes it so that we prevent such resizing and if so, throw an exception before we reach native code. This commit adds resizing checks that prevent resizing the terminal WPF control to a size of `(0, 0)` (cherry picked from commit 5a518e5)
🎉 Handy links: |
🎉 Handy links: |
We are getting some watson crash reports that the terminal is attempting
to resize to
(0, 0)
. This change makes it so that we prevent suchresizing and if so, throw an exception before we reach native code.
This commit adds resizing checks that prevent resizing the terminal WPF
control to a size of
(0, 0)