diff --git a/src/host/screenInfo.cpp b/src/host/screenInfo.cpp index 2506bf450..5323cb574 100644 --- a/src/host/screenInfo.cpp +++ b/src/host/screenInfo.cpp @@ -2002,8 +2002,6 @@ void SCREEN_INFORMATION::UseMainScreenBuffer() SCREEN_INFORMATION* psiAlt = psiMain->_psiAlternateBuffer; psiMain->_psiAlternateBuffer = nullptr; - s_RemoveScreenBuffer(psiAlt); // this will also delete the alt buffer - // deleting the alt buffer will give the GetSet back to its main // Copy the alt buffer's cursor style and visibility back to the main buffer. const auto& altCursor = psiAlt->GetTextBuffer().GetCursor(); @@ -2012,6 +2010,9 @@ void SCREEN_INFORMATION::UseMainScreenBuffer() mainCursor.SetIsVisible(altCursor.IsVisible()); mainCursor.SetBlinkingAllowed(altCursor.IsBlinkingAllowed()); + s_RemoveScreenBuffer(psiAlt); // this will also delete the alt buffer + // deleting the alt buffer will give the GetSet back to its main + // Tell the VT MouseInput handler that we're in the main buffer now gci.GetActiveInputBuffer()->GetTerminalInput().UseMainScreenBuffer(); }