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

Suppress cursor blinking when text is actively being printed #1087

Open
dkter opened this issue May 31, 2019 · 7 comments
Open

Suppress cursor blinking when text is actively being printed #1087

dkter opened this issue May 31, 2019 · 7 comments
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Milestone

Comments

@dkter
Copy link
Contributor

dkter commented 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.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 31, 2019
@DHowett-MSFT
Copy link
Contributor

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.

@dkter
Copy link
Contributor Author

dkter commented 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
Copy link
Contributor Author

dkter commented 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.

@zadjii-msft
Copy link
Member

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 zadjii-msft added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Conpty For console issues specifically related to conpty labels Jun 3, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jun 3, 2019
@zadjii-msft zadjii-msft added this to the Terminal v1.0 milestone Jun 3, 2019
@DHowett-MSFT DHowett-MSFT added Issue-Task It's a feature request, but it doesn't really need a major design. and removed Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 3, 2019
@DHowett-MSFT DHowett-MSFT changed the title Cursor blinks when printing text Suppress cursor blinking when text is actively being printed Jun 3, 2019
@DHowett-MSFT DHowett-MSFT added Product-Terminal The new Windows Terminal. and removed Product-Conpty For console issues specifically related to conpty labels Jun 3, 2019
@scottstanfield
Copy link

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.

@ednl
Copy link

ednl commented Sep 24, 2019

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

@Vyogami
Copy link

Vyogami commented Oct 22, 2021

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

@zadjii-msft zadjii-msft modified the milestones: Terminal v2.0, 22H2 Jan 4, 2022
@zadjii-msft zadjii-msft modified the milestones: 22H2, Backlog Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

8 participants