aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/input.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/input.rs b/src/input.rs
index 30262d2..6362e48 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -16,6 +16,9 @@ impl Calculator {
return Signal::Exit;
}
KeyCode::Char('j' | 'k') => self.swap(),
+ KeyCode::Char('d') => {
+ self.input_buffer = String::new();
+ }
KeyCode::Char(c) => self.push_to_buffer(c),
KeyCode::Enter => self.push_buffer_to_stack(),
KeyCode::Backspace => {