Fixes #2611 bypass some repaint just after resize#2612
Merged
Dunbaratu merged 1 commit intoKSP-KOS:developfrom Sep 4, 2019
Merged
Conversation
Just after a GUI pass notices the terminal got resized, the screen buffers are temporarily the wrong size for the next GUI repaint pass. They will get corrected later, but for a brief moment they're wrong, and that was causing the exception. When the exception got thrown, it aborted the GUI pass before the code that recalculates the buffer size gets reached, so the same exception happens again the next pass, and so on. The fix was to just let the repaint pass work with the wrong buffer size (protecting against the things being out of bounds, and just painting the subset of the buffer that fits). On the next repaint pass after that it should have the right buffer sizes recalced by then and be able to paint it right.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fixes #2611
Just after a GUI pass notices the terminal got resized,
the screen buffers are temporarily the wrong size for
the next GUI repaint pass. They will get corrected
later, but for a brief moment they're wrong, and that
was causing the exception. When the exception got
thrown, it aborted the GUI pass before the code that
recalculates the buffer size gets reached, so the same
exception happens again the next pass, and so on.
The fix was to just let the repaint pass work with
the wrong buffer size (protecting against the things
being out of bounds, and just painting the subset of the
buffer that fits). On the next repaint pass after that
it should have the right buffer sizes recalced by then and
be able to paint it right.