Skip to content

Commit

Permalink
more comments are always good
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Feb 23, 2022
1 parent 1209fa4 commit bf24cdd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/host/screenInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1941,6 +1941,9 @@ const SCREEN_INFORMATION& SCREEN_INFORMATION::GetMainBuffer() const
s_RemoveScreenBuffer(psiOldAltBuffer); // this will also delete the old alt buffer
}

// GH#381: When we switch into the alt buffer:
// * flush the current frame, to clear out anything that we prepared for this buffer.
// * Emit a ?1049h/l to the remote side, to let them know that we've switched buffers.
if (gci.IsInVtIoMode() && ServiceLocator::LocateGlobals().pRender)
{
ServiceLocator::LocateGlobals().pRender->TriggerFlush(false);
Expand Down Expand Up @@ -1978,6 +1981,9 @@ void SCREEN_INFORMATION::UseMainScreenBuffer()
psiMain->_fAltWindowChanged = false;
}

// GH#381: When we switch into the alt buffer:
// * flush the current frame, to clear out anything that we prepared for this buffer.
// * Emit a ?1049h/l to the remote side, to let them know that we've switched buffers.
if (gci.IsInVtIoMode() && ServiceLocator::LocateGlobals().pRender)
{
ServiceLocator::LocateGlobals().pRender->TriggerFlush(false);
Expand Down

1 comment on commit bf24cdd

@github-actions

This comment was marked as duplicate.

Please sign in to comment.