Skip to content

Commit

Permalink
This might fix #1095.
Browse files Browse the repository at this point in the history
  When we resize the conpty buffer, we'll call into
  SCREEN_INFORMATION::_InternalSetViewportSize, which will try to keep the
  commandline visible.
  However, we don't even want the commandline visible while that's happening.
  We should hide it and reflow the start of the commandline.

  I'm actually not sure this is the fix for #1095. #1095 uses WSL, which isn't
  going to be COOKED_READing.

  Aditionally, the commandline can end up in some weird places after this. Like
  when restoring down with a commandline wider than the restored width, the
  commandline will appear one line below where it should. That might be a side
  effect of the rest of the changes I'm prototyping (for #1795)
  • Loading branch information
zadjii-msft committed Jul 29, 2019
1 parent bd5cae1 commit d34a3be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/host/getset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,10 @@ void ApiRoutines::GetLargestConsoleWindowSizeImpl(const SCREEN_INFORMATION& cont
if (NewSize.X != context.GetViewport().Width() ||
NewSize.Y != context.GetViewport().Height())
{
CommandLine& commandLine = CommandLine::Instance();
commandLine.Hide(FALSE);
context.SetViewportSize(&NewSize);
commandLine.Show();

IConsoleWindow* const pWindow = ServiceLocator::LocateConsoleWindow();
if (pWindow != nullptr)
Expand Down

0 comments on commit d34a3be

Please sign in to comment.