Suppress cursor blinking when text is actively being printed #1455

Open
opened 2026-01-30 22:27:39 +00:00 by claunia · 7 comments
Owner

Originally created by @dkter on GitHub (May 31, 2019).

Here's an edge case I didn't cover in #686 - though it might warrant its own issue anyway.

Environment

Windows build number: 10.0.18362.145
Windows Terminal version (if applicable): commit 71e19cd82528d66a0a7867cbed85990cfc1685f1

Any other software?

Steps to reproduce

Print a lot of text to the console. This is especially apparent with progress bars that require backspace characters.

Actual behavior

The cursor continues to blink, or if the cursor blinking is turned off it stays on. This leads to some weird behaviour:

2019-05-31_17-20-01
2019-05-31_17-27-22

Expected behavior

I'm thinking the cursor should automatically hide when printing text. I've seen this done in a few other terminal programs.

Originally created by @dkter on GitHub (May 31, 2019). Here's an edge case I didn't cover in #686 - though it might warrant its own issue anyway. # Environment ```none Windows build number: 10.0.18362.145 Windows Terminal version (if applicable): commit 71e19cd82528d66a0a7867cbed85990cfc1685f1 Any other software? ``` # Steps to reproduce Print a lot of text to the console. This is especially apparent with progress bars that require backspace characters. # Actual behavior The cursor continues to blink, or if the cursor blinking is turned off it stays on. This leads to some weird behaviour: ![2019-05-31_17-20-01](https://user-images.githubusercontent.com/34610081/58735668-1fff4900-83c9-11e9-8a0b-6fc7f0e4df47.gif) ![2019-05-31_17-27-22](https://user-images.githubusercontent.com/34610081/58735738-62288a80-83c9-11e9-9e80-123cc7631695.gif) # Expected behavior I'm thinking the cursor should automatically hide when printing text. I've seen this done in a few other terminal programs.
claunia added the Help WantedArea-RenderingIssue-TaskPriority-3Product-Terminal labels 2026-01-30 22:27:40 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 1, 2019):

This would probably be more adequately handled by supporting cursor off/on sequences in ConPTY, right? It seems most ideal that an application printing a progress bar would turn off the cursor before doing so.

@DHowett-MSFT commented on GitHub (Jun 1, 2019): This would probably be more adequately handled by supporting cursor off/on sequences in ConPTY, right? It seems most ideal that an application printing a progress bar would turn off the cursor before doing so.
Author
Owner

@dkter commented on GitHub (Jun 1, 2019):

@DHowett-MSFT I didn't even know that there were sequences to toggle the cursor on/off! That would definitely be the ideal approach.

@dkter commented on GitHub (Jun 1, 2019): @DHowett-MSFT I didn't even know that there were sequences to toggle the cursor on/off! That would definitely be the ideal approach.
Author
Owner

@dkter commented on GitHub (Jun 1, 2019):

Upon further investigation, it looks like most terminals (including conhost) show the cursor when text is being printed (except when the cursor toggle sequences are used). This isn't a major issue, but try gci C:\Windows\System32 -- it looks a bit weird to have the cursor still blinking. Resetting the cursor timer might provide a smoother experience, but I'm not sure what the impact would be on the output performance.

I'll leave this open and open a new issue for cursor show/hide sequences it looks like there's already an issue for discussing ANSI escape sequences over at #138.

@dkter commented on GitHub (Jun 1, 2019): Upon further investigation, it looks like most terminals (including conhost) *show* the cursor when text is being printed (except when the cursor toggle sequences are used). This isn't a major issue, but try `gci C:\Windows\System32` -- it looks a bit weird to have the cursor still blinking. Resetting the cursor timer might provide a smoother experience, but I'm not sure what the impact would be on the output performance. I'll leave this open ~~and open a new issue for cursor show/hide sequences~~ it looks like there's already an issue for discussing ANSI escape sequences over at #138.
Author
Owner

@zadjii-msft commented on GitHub (Jun 3, 2019):

Yea I had a PR internally for properly rendering the cursor state with conpty before moving to open source, but I don't think I ever followed up on it since the move. I'll need to port it out here

@zadjii-msft commented on GitHub (Jun 3, 2019): Yea I had a PR internally for properly rendering the cursor state with conpty before moving to open source, but I don't think I ever followed up on it since the move. I'll need to port it out here
Author
Owner

@scottstanfield commented on GitHub (Sep 11, 2019):

You can see this behavior in htop under WSL. If you set your profile cursor to filledBox and use a standout cursor color like Magenta (don't knock it until you try it) #FF00FF then the bug really stands out.

@scottstanfield commented on GitHub (Sep 11, 2019): You can see this behavior in `htop` under WSL. If you set your profile cursor to `filledBox` and use a standout cursor color like Magenta (don't knock it until you try it) `#FF00FF` then the bug really stands out.
Author
Owner

@ednl commented on GitHub (Sep 24, 2019):

+1 for enabling cursor on/off escape sequences, please! :) I.e., normally: \e[?25l to hide and \e[?25h to show.

@ednl commented on GitHub (Sep 24, 2019): +1 for enabling cursor on/off escape sequences, please! :) I.e., normally: \e[?25l to hide and \e[?25h to show.
Author
Owner

@Vyogami commented on GitHub (Oct 23, 2021):

I'm having the same issue, can someone help me

@Vyogami commented on GitHub (Oct 23, 2021): I'm having the same issue, can someone help me
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1455