terminal/src/cascadia
Mike Griese 10fa3108e1
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
2020-04-29 23:47:56 +00:00
..
CascadiaPackage Include Cascadia Mono in-package, switch to it by default (#5505) 2020-04-23 22:12:36 +00:00
inc ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
LocalTests_TerminalApp Add a warning about using the globals property (#5597) 2020-04-27 22:20:18 +00:00
PublicTerminalCore Remove the title tag from the generated HTML (#5595) 2020-04-29 16:41:56 -07:00
TerminalApp Remove "Getting Started" from the about dialog (#5656) 2020-04-29 16:37:00 -07:00
TerminalAzBridge deps: upgrade CppWinRT to 2.0.200316.3, gsl to v2.1.0 (#4536) 2020-03-23 17:15:24 +00:00
TerminalConnection Add WT_PROFILE_ID to the environment of the spawned process (#4852) 2020-04-17 17:15:20 +00:00
TerminalControl Remove the title tag from the generated HTML (#5595) 2020-04-29 16:41:56 -07:00
TerminalCore Clamp the new rows scrolling value to a positive number (#5630) 2020-04-29 19:28:59 +00:00
TerminalSettings Rework and simplify selection in TermControl (#5096) 2020-03-25 21:09:49 +00:00
UnitTests_TerminalCore Hide the commandline on a resize to prevent a crash when snapping the window (#5620) 2020-04-29 23:47:56 +00:00
ut_app ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
WindowsTerminal Add and enforce minimum width (#5599) 2020-04-28 23:24:21 +00:00
WindowsTerminalUniversal build: move oss required to build conhost out of dep/ (#5451) 2020-04-21 14:43:09 -07:00
WinRTUtils deps: upgrade CppWinRT to 2.0.200316.3, gsl to v2.1.0 (#4536) 2020-03-23 17:15:24 +00:00
WpfTerminalControl wpf: only dismiss selection for real chars, not modifiers (#5388) 2020-04-17 11:28:56 -07:00
CascadiaResources.build.items Include Cascadia Mono in-package, switch to it by default (#5505) 2020-04-23 22:12:36 +00:00