Fix the cursor blink VT sequence being ignored (#10589)

Ensure that the cursor blink VT sequence gets flushed to terminal when conhost is attached to a pty

Closes #10543

(cherry picked from commit 6409ab91fa)
This commit is contained in:
PankajBhojwani 2021-07-09 11:45:16 -07:00 committed by Dustin Howett
parent 89b420c572
commit 91d599b830
No known key found for this signature in database
GPG key ID: 0719BB71B334EE77

View file

@ -336,7 +336,16 @@ bool ConhostInternalGetSet::PrivateShowCursor(const bool show) noexcept
bool ConhostInternalGetSet::PrivateAllowCursorBlinking(const bool fEnable)
{
DoSrvPrivateAllowCursorBlinking(_io.GetActiveOutputBuffer(), fEnable);
return true;
bool isPty;
DoSrvIsConsolePty(isPty);
// If we are connected to a pty, return that we could not handle this
// so that the VT sequence gets flushed to terminal.
// Note: we technically don't need to handle it ourselves at all if
// we are connected to a pty (i.e. we could have just returned false
// immediately without needing to call DoSrvPrivateAllowCursorBlinking),
// but we call it anyway for consistency, just in case.
return !isPty;
}
// Routine Description: