Skip to content

Commit

Permalink
Fix the cursor blink VT sequence being ignored (#10589)
Browse files Browse the repository at this point in the history
Ensure that the cursor blink VT sequence gets flushed to terminal when conhost is attached to a pty

Closes #10543

(cherry picked from commit 6409ab9)
  • Loading branch information
PankajBhojwani authored and DHowett committed Jul 12, 2021
1 parent 89b420c commit 91d599b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/host/outputStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 91d599b

Please sign in to comment.