summaryrefslogtreecommitdiffstats
path: root/src/components/mail/listing.rs
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2020-10-20 15:09:00 +0300
committerManos Pitsidianakis <el13635@mail.ntua.gr>2020-10-20 15:09:00 +0300
commit9f39a7c5a17ee3e500a42e9c79772e09e0a15abe (patch)
treefcb3cf4b712612675db81ca84b66b4fcb6cba7c3 /src/components/mail/listing.rs
parent126ed8a1896f7a93221a12325028a9b2437a1972 (diff)
statusbar: delete num buffer chars with Backspace
Diffstat (limited to 'src/components/mail/listing.rs')
-rw-r--r--src/components/mail/listing.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/components/mail/listing.rs b/src/components/mail/listing.rs
index 5dc8f9e1..efa9727b 100644
--- a/src/components/mail/listing.rs
+++ b/src/components/mail/listing.rs
@@ -1229,6 +1229,15 @@ impl Component for Listing {
self.get_status(context),
)));
}
+ UIEvent::Input(Key::Backspace) if !self.cmd_buf.is_empty() => {
+ self.cmd_buf.pop();
+ context
+ .replies
+ .push_back(UIEvent::StatusEvent(StatusEvent::BufSet(
+ self.cmd_buf.clone(),
+ )));
+ return true;
+ }
UIEvent::Input(Key::Esc) | UIEvent::Input(Key::Alt('')) if !self.cmd_buf.is_empty() => {
self.cmd_buf.clear();
self.component.set_command_modifier(false);