-
Notifications
You must be signed in to change notification settings - Fork 285
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
Make cursor screen specific #169
Comments
Does this still apply with crossterm's current API? Either way, the title should be changed. |
I believe it is. It is related to the alternate screen and main screen. If one disables the cursor on an alternate screen it will still be disabled if it leaves the alternate screen. |
Can't reproduce this on Windows 10, tried both cmd and powershell. Here's the code I used to test it
|
Ah so that's why it wasn't added yet, I guess we can track my change here #775 for a reminder to revert it once this gets added. |
Task Description
When switching back -- dropping the new screen that was created just for the alternative screen; the terminal still has the cursor hidden.
Notice how the code, upon closing, re-establishes some default state like showing the cursor back into stdout. Not sure if Unix-y systems has an equivalent to winapi's GetConsoleState, but it would be preferable to restore the preexisting state, rather than overwriting state (even if they are sane defaults)
Task Todo
This issue is due to not restoring the previous console/terminal settings on shutdown. When applying syscalls to hide or show cursor, it needs to be reversed on exit -- checkout termbox-go's implementation. https://github.com/nsf/termbox-go/blob/master/api.go#L129
The text was updated successfully, but these errors were encountered: