bubbletea icon indicating copy to clipboard operation
bubbletea copied to clipboard

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

Open jon4hz opened this issue 4 years ago • 5 comments

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.

jon4hz avatar Jan 12 '22 18:01 jon4hz

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?

meowgorithm avatar Jan 12 '22 18:01 meowgorithm

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

Eg:

image

jon4hz avatar Jan 12 '22 18:01 jon4hz

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 avatar Jan 12 '22 18:01 meowgorithm

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.

jon4hz avatar Jan 12 '22 19:01 jon4hz

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.

meowgorithm avatar Jan 12 '22 19:01 meowgorithm