diff --git a/src/lib.rs b/src/lib.rs index 3ebeb2c..5ebc40a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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));