[PR #4902] Add support for setting the cursor visibility in Terminal #26018

Closed
opened 2026-01-31 09:13:23 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/4902

State: closed
Merged: Yes


Adds support for setting the cursor visibility in Terminal. Visibility
is a property entirely independent from whether the cursor is "on" or
not. The cursor blinker should change the "IsOn" property. It was
actually changing the "Visible" property, which was incorrect. This PR
additionally corrects the naming of the method used by the cursor
blinker, and makes it do the right thing.

I added a pair of tests, one taken straight from conhost. In
copy-pasting that test, I took it a step further and implemented
^[[?12h, ^[[?12l, which enables/disables cursor blinking, for the
TerminalCore. THIS DOES NOT ADD SUPPORT FOR DISABLING BLINKING IN THE
APP. Conpty doesn't emit the blinking on/off sequences quite yet, but
when it does, the Terminal will be ready.

References

  • I'd bet this conflicts with #2892
  • This isn't a solution for #1379
  • There shockingly isn't an issue for cursor blink state via conpty...?

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/4902 **State:** closed **Merged:** Yes --- Adds support for setting the cursor visibility in Terminal. Visibility is a property entirely independent from whether the cursor is "on" or not. The cursor blinker _should_ change the "IsOn" property. It was actually changing the "Visible" property, which was incorrect. This PR additionally corrects the naming of the method used by the cursor blinker, and makes it do the right thing. I added a pair of tests, one taken straight from conhost. In copy-pasting that test, I took it a step further and implemented `^[[?12h`, `^[[?12l`, which enables/disables cursor blinking, for the `TerminalCore`. THIS DOES NOT ADD SUPPORT FOR DISABLING BLINKING IN THE APP. Conpty doesn't emit the blinking on/off sequences quite yet, but when it _does_, the Terminal will be ready. ## References * I'd bet this conflicts with #2892 * This isn't a solution for #1379 * There shockingly isn't an issue for cursor blink state via conpty...? ## PR Checklist * [x] Closes #3093 * [x] Closes #3499 * [x] Closes #4644 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated
claunia added the pull-request label 2026-01-31 09:13:23 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26018