Skip to content

Commit

Permalink
This at a minimum passes the sequences through
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Jan 21, 2020
1 parent 027f122 commit 9733a9f
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/terminal/adapter/adaptDispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,14 @@ bool AdaptDispatch::EraseInDisplay(const DispatchTypes::EraseType eraseType)
// by moving the current contents of the viewport into the scrollback.
if (eraseType == DispatchTypes::EraseType::Scrollback)
{
return _EraseScrollback();
const bool eraseScrollbackResult = _EraseScrollback();
// GH#2715 - If this succeeded, but we're in a conpty, return `false` to
// make the state machine propogate this ED sequence to the connected
// terminal application. While we're in conpty mode, we don't really
// have a scrollback, but the attached terminal might.
bool isPty = false;
_pConApi->IsConsolePty(isPty);
return eraseScrollbackResult && (!isPty);
}
else if (eraseType == DispatchTypes::EraseType::All)
{
Expand Down Expand Up @@ -1460,6 +1467,17 @@ bool AdaptDispatch::HardReset()
// delete all current tab stops and reapply
_pConApi->PrivateSetDefaultTabStops();

// GH#2715 - If all this succeeded, but we're in a conpty, return `false` to
// make the state machine propogate this RIS sequence to the connected
// terminal application. We've reset our state, but the connected terminal
// might need to do more.
bool isPty = false;
_pConApi->IsConsolePty(isPty);
if (isPty)
{
return false;
}

return success;
}

Expand Down

0 comments on commit 9733a9f

Please sign in to comment.