diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2023-02-03 10:28:38 -0330 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2023-02-03 10:28:38 -0330 |
| commit | 58b6e5caac45e6f12b749ec8e3f4cf535ec25520 (patch) | |
| tree | 5c95e52ed47a888888ff7fe0125f3c3a9d09268e | |
| parent | c3c5d07e70e884d68caca4a42424dba839a8ddb5 (diff) | |
| download | pfc-58b6e5caac45e6f12b749ec8e3f4cf535ec25520.zip | |
press d to delete buffer
| -rw-r--r-- | src/input.rs | 3 |
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 => { |