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
This commit is contained in:
PankajBhojwani 2021-07-09 11:45:16 -07:00 committed by GitHub
parent a0527a1dbe
commit 6409ab91fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -344,7 +344,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: