From 91d599b8309823c575d9332d2d6b013ec8e8628d Mon Sep 17 00:00:00 2001 From: PankajBhojwani Date: Fri, 9 Jul 2021 11:45:16 -0700 Subject: [PATCH] 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 6409ab91faf3fd1233fce321eb3469cfb04432af) --- src/host/outputStream.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/host/outputStream.cpp b/src/host/outputStream.cpp index 3aa7fd5085b..868bfdbc98b 100644 --- a/src/host/outputStream.cpp +++ b/src/host/outputStream.cpp @@ -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: