-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Setting Console.CursorVisible property does not change visibility in Linux #31063
Comments
@bryansmi What is your |
Hi, I have the same problem. I need to get/set the cursor's visibility and I receive an exception on get. The result of infocmp on my machine (Ubuntu 20.04.1):
|
There's no good way to get the cursor's visibility, so it throws PlatformNotSupportedException. That's by design. Are you also having issues setting the cursor's visibility? |
I was able to hide it, but, for some reason, it could not display it back. (On Windows it was displayed back, but not on Ubuntu.) |
No updates for 3 years, closing. |
Hello! I've been using the Console cursor APIs for .NET Core 3.0 in WSL 2. I've noticed that the
Console.CursorVisible
property has non-intuitive behavior (to me) in Linux (Ubuntu). When getting the property, aPlatformNotSupportedException
is thrown. When setting the property, no exception is thrown, but nothing appears to happen - the cursor is still visible.Is there any intention to support setting the visibility of the cursor across all platforms? Thanks!
Additional Investigation Notes
Looking through the source, it appears
ConsolePal.Unix
is responsible for handling this API. Upon the set, it appears we try to write some standard string to the console:It appears that
TerminalFormatStrings.CursorInvisible
refers toCursorInvisible = db.GetString(TermInfo.WellKnownStrings.CursorInvisible);
whereinTermInfo
is an enum stored in a database. I've ended my investigation at this point - I'm guessing this is designed behavior.The text was updated successfully, but these errors were encountered: