lib.rs
term_cursor
term_cursor. A pure-rust crate for manipulating the position of the terminal cursor! Also allows for clearing the screen! Usage extern crate term_cursor as cursor; fn main() {// Clear the screen. Does not reset the cursor position! print!("{}", cursor::Clear); // Position the cursor at column 5 and row 10 and print "Hello world!". print!
Crossterm
Cursor Move the cursor N times (up, down, left, right) Move to previous / next line; Move to column; Set/get the cursor position; Store the cursor position and restore to it later; Hide/show the cursor; Enable/disable cursor blinking (not all terminals do support this feature) Styled output Foreground color (16 base colors) Background color (16 ...
Rat-Cursor
Instead of setting the cursor position during rendering somehow, the rendering process stores the cursor position in the state struct, where it can be retrieved later on. The trait returns a screen-position, but only if it actually needs the cursor to be displayed: The cursor is not scrolled off-screen. The widget has some kind of input-focus.