Fixed backspace

This commit is contained in:
Justine
2023-02-02 11:35:56 +01:00
parent 88a35d692c
commit f7e6063778

View File

@ -208,7 +208,7 @@ pub mod shell {
//clears currently written command from the screen
//...NOT from the variable !
let mut stdout = stdout().into_raw_mode().unwrap();
let right_spaces: u16 = (*max_pos - *current_pos).try_into().unwrap();
let right_spaces: u16 = (*max_pos - *current_pos + 1).try_into().unwrap();
write!(stdout, "{}", cursor::Right(right_spaces));
for _i in 0..*max_pos {
write!(stdout, "{}", cursor::Left(1));