From f7e6063778174428cf73210658fe0ab17857d1aa Mon Sep 17 00:00:00 2001 From: Justine Date: Thu, 2 Feb 2023 11:35:56 +0100 Subject: [PATCH] Fixed backspace --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));