Running 17672, I suddenly found (with two terminal windows open) that one terminal window's cursor had turned black instead of gray. From that point onwards, all my terminals (Windows or WSL) have had a black cursor (even after DECSCUSR calls).
I imagine this might be related to the newly landed support for setting cursor shape, but I'm unable to get this color change to revert.
Deleting CursorColor in the Console registry key took care of the issue, but I'm not sure how it could have come to be in the first place. This option isn't exposed userland, is it? Black is DWORD 0, so it _could_ be that the value was simply created with a default integer for its content, but again, not sure how that happened.
Oh no, this bug actually made it out to insiders 😢
I noticed this a few builds ago internally, I'm not totally sure what it is, but I believe it's a bad manifesting issue, but I already have a bug open to investigate more.
You're correct, deleting the CursorColor key will revert it to the old behavior. Alternatively, you could set it to another hex value to actually give the cursor a specific color.
What's happening with this bug I believe is that we're zeroing out the cursor color, causing it to render as black on black.
Thanks for the speedy reply! Would pre-creating the registry field with a non-zero value on build upgrade perhaps avoid the problem?
That's almost certainly going to be the fix, yea.
To get more specific: conhost treats 0xffffffff as an invalid color. When it sees that value for the cursor color, it knows to instead use the legacy "invert color" behavior of the cursor.
I think I forgot to add to the manifests that the defaults for that reg key (and shortcut property) should be 0xffffffff, so those values are left un-filled.
At about the same time we started type-checking the values in the registry for settings, and zeroing them appropriately.
I'm not sitting in front of the code right now, but my guess is that we're finding no value for the cursor color, and instead of defaulting to 0xffffffff, we're defaulting to 0x00000000 - black.
Fortunately, because these settings get re-applied on build-to-build upgrades, as soon as I fix the manifest it should fix your settings :)
Checked in the fix earlier today.
WE really should create a batch script that people can use to set their cursor colors just in case they run into this, or if they want to change the colors of their cursor just for the heck of it. I just haven't had the cycles to put something together.
Fix is out in Insider build 17711. On the main Windows Build blog too vice WSL/Console Release Notes (which I found odd).
We fixed an issue that could result in the console forgetting the cursor color on upgrade and it getting set to 0x000000 (black). The fix will prevent future users from hitting this issue, but if you’ve already been impacted by this bug, you’ll need to manually fix the setting in the registry. To do this, open regedit.exe and delete the ‘CursorColor’ entry in ‘Computer\HKEY_CURRENT_USERConsole’ and any sub-keys, and re-launch your console window.
As per https://github.com/Microsoft/console/issues/232, this has NOT been fixed even as of 17713, and more fixes are inbound.
Is there a workaround that works on 17713? Deleting the registry key seems not to, changing the registry key seems not do (tried 0x00202020), or if I go to Fast Insiders, maybe I pick up enough fixes?
Ironically, I went to Insiders just to get the Copy/Paste console fix, which is best feature ever 😁
Yea, it seems that the black cursor color could corrupt your shortcut, which you'd be unable to fix at all. So please be patient while more fixes bubble out :)
What worked for me was setting the cursor color to 60606060, and the cursor type to 1 from zero.
Happy to be patient, sort of, not having a cursor was killing me, was about to roll back, the workaround saved running Insider....
Hi, what's the full path for the registry key? I've been struggling with this as well
@ioweb-gr That depends on how you're launching the console. I'd take a look at HKCU\Console and all of it's sub-keys. If you remove all the CursorColor settings from that tree, then the setting is being stored in the shortcut (.lnk), not the registry.
The persistence (and loading) of the cursor color was disabled for the 1809 release, so whenever you get upgraded to the October Update, that should fix it.
thanks @zadjii-msft I wanted to try the solution here in case it helped because my problem seemed similar however my problem doesn't seem to be the same as this one as the cursor color settings didn't change anything at all. My cursor seems to disappear when moving it with arrow keys or while typing. If I leave it there it starts blinking again after a while and I see it but it makes it really hard to type.
The shortcut I'm using is the default shortcut from the ubuntu store app. I'm running currently build 18252.1000.
@ioweb-gr that's #269, unrelated to the cursor color issue.
Ah great. I couldn't find it before. I'll monitor that thread then
Most helpful comment
Checked in the fix earlier today.
WE really should create a batch script that people can use to set their cursor colors just in case they run into this, or if they want to change the colors of their cursor just for the heck of it. I just haven't had the cycles to put something together.