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

Cursor visible in cmd.exe on Windows when the altscreen is active #190

Closed
jon4hz opened this issue Jan 12, 2022 · 5 comments · Fixed by #537
Closed

Cursor visible in cmd.exe on Windows when the altscreen is active #190

jon4hz opened this issue Jan 12, 2022 · 5 comments · Fixed by #537
Labels
bug Something isn't working

Comments

@jon4hz
Copy link
Contributor

jon4hz commented Jan 12, 2022

I've tested a bubbletea program on windows 11 and it seems that the cursor always stays visible in the left corner of the terminal. In the windows terminal as well as in powershell. It seems that newer versions of windows terminal have fixed this. Affected is only cmd.exe / powershell.

@meowgorithm
Copy link
Member

Is this after the cursor is shown via spawning another terminal-based program or are you finding the cursor is always visible in Bubble Tea applications on Windows 11 in general?

@jon4hz
Copy link
Contributor Author

jon4hz commented Jan 12, 2022

The cursor is always visible in general. Just keeps blinking in the lower left corner.

Eg:

image

@meowgorithm
Copy link
Member

meowgorithm commented Jan 12, 2022

Okay, interesting. I'm seeing this behavior in Windows 11, but only when both of these conditions are met:

  1. In the legacy command console (cmd.exe) and Powershell standalone app (Powershell standalone runs cmd.exe under the hood) — Windows Terminal seems fine
  2. When the altscreen is active (i.e. I see it in the list-default example, but not list-simple)

Let me know if this is what you're seeing on your end too. Either way, this is a bug.

@meowgorithm meowgorithm added the bug Something isn't working label Jan 12, 2022
@meowgorithm meowgorithm changed the title hideCursor has no effect on windows Cursor visible in cmd.exe on Windows when the altscreen is active Jan 12, 2022
@jon4hz
Copy link
Contributor Author

jon4hz commented Jan 12, 2022

I just saw that windows 11 has a pretty outdated version of the windows terminal preinstalled by default. After upgrading to version 1.11.... the bug in the windows terminal seems to be fixed. However the bug is still there in powershell / cmd.exe and your statement is correct.
I could reproduce the bug if the conditions you mentioned are met.

@meowgorithm
Copy link
Member

meowgorithm commented Jan 12, 2022

Noted, thank you. With any luck when we fix the bug in cmd.exe it'll also fix the bug in older versions of Windows Terminal.

muesli pushed a commit that referenced this issue Sep 27, 2022
muesli added a commit that referenced this issue Oct 13, 2022
Based on #462 and #452 by @londek, but fixes maintaining the
current visiblity state across altscreen state changes.

This makes the behavior consistent across terminals.

Fixes #190.
muesli added a commit that referenced this issue Oct 13, 2022
Based on #462 and #452 by @londek, but fixes maintaining the
current visibility state across altscreen state changes.

This makes the behavior consistent across terminals, some of which
keep separate state for altscreen and regular buffer.

Fixes #190.
muesli added a commit that referenced this issue Oct 23, 2022
Based on #462 and #452 by @londek, but fixes maintaining the
current visibility state across altscreen state changes.

This makes the behavior consistent across terminals, some of which
keep separate state for altscreen and regular buffer.

Fixes #190.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants