tuikit icon indicating copy to clipboard operation
tuikit copied to clipboard

Cursor disappears after running tuikit

Open kneasle opened this issue 3 years ago • 2 comments

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!

kneasle avatar Nov 08 '20 22:11 kneasle

@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.

lotabout avatar Nov 09 '20 04:11 lotabout

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!

kneasle avatar Nov 09 '20 12:11 kneasle