misc improvements

This commit is contained in:
nora 2024-08-26 19:50:24 +02:00
parent ca4213ba81
commit 26cdcd0524
7 changed files with 39 additions and 31 deletions

View file

@ -43,7 +43,7 @@ impl InteractiveShell {
127 => {
// Backspace, space, backspace.
// We literally erase it.
if self.line_buf.len() > 0 {
if !self.line_buf.is_empty() {
self.write(&[8, 32, 8]);
self.line_buf.truncate(self.line_buf.len() - 1);
}