-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hide the commandline on a resize to prevent a crash when snapping the…
… window (#5620) Hide any commandline (cooked read) we have before we begin a resize, and show it again after the resize. ## References * I found #5618 while I was working on this. ## PR Checklist * [x] Closes #1856 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments Basically, during a resize, we try to restore the viewport position correctly, and part of that checks where the current commandline ends. However, when we do that, the commandline's _current_ state still reflects the _old_ buffer size, so resizing to be smaller can cause us to throw an exception, when we find that the commandline doesn't fit in the new viewport cleanly. By hiding it, then redrawing it, we avoid this problem entirely. We don't need to perform the check on the old commandline contents (since they'll be empty), and we'll redraw it just fine for the new buffer size ## Validation Steps Performed * ran tests * checked resizing, snapping in conhost with a cooked read * checked resizing, snapping in the Terminal with a cooked read
- Loading branch information
1 parent
ea02128
commit 10fa310
Showing
3 changed files
with
96 additions
and
28 deletions.
There are no files selected for viewing
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
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
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