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 disappears after running tuikit #28

Open
kneasle opened this issue Nov 8, 2020 · 2 comments
Open

Cursor disappears after running tuikit #28

kneasle opened this issue Nov 8, 2020 · 2 comments

Comments

@kneasle
Copy link

kneasle commented Nov 8, 2020

I'm not sure why this is happening, but when I use tuikit in a Rust application the cursor in my terminal disappears after I run that Rust application.

So as an example, this is before running tuikit:
image

Then afterwards:
image

I'm running Linux Mint and this effect has been consistent over every possible combination of bash/fish and GNOME terminal/alacritty. I also tried showing the cursor just before exiting tuikit, but that had no effect.

I feel like I may be missing some obvious solution, but I can't seem to find one...

Generally an excellent and simple library, though - nice work!

@lotabout
Copy link
Collaborator

lotabout commented Nov 9, 2020

@kneasle Which version do you use currently? And could you please provide a minimal example to reproduce? I've tried cargo run --example hello-world on Alacritty and could not reproduce.

@kneasle
Copy link
Author

kneasle commented Nov 9, 2020

I also tried cargo run --example hello-world and the bug did not happen. The project I'm using has the cursor almost permanently hidden, but if I show the cursor just before closing with

self.term.set_cursor(0, 0).unwrap();
self.term.present().unwrap();

then the problem is solved. I wonder, though, if this should be the default behaviour - it seems pretty strange that the cursor disappears permanently by default.

Thanks for the help though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants