Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the cursor blink VT sequence being ignored #10589

Merged
2 commits merged into from
Jul 9, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/host/outputStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,12 @@ 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confusing. We did handle it by turning on our own blinking... didn't we with DoSrvPrivateAllowCursorBlinking above?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returning false in an event handler for the VT Parser's OutputStateMachineEngine has been overloaded to mean, "Pass this through to the connected terminal."

This is not the first, and will likely not be the last, case in which we do this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we are saying that we need to process it AND the connected terminal needs to process it too... right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So technically we don't need to process it ourselves, only the connected terminal needs to. I've done it this way just so there's consistency between the two, just in case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just leave that as a comment then to inform a future reader, please, and I'm good then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, added!

// so that the VT sequence gets flushed to terminal
return !isPty;
}

// Routine Description:
Expand Down