From 9f39a7c5a17ee3e500a42e9c79772e09e0a15abe Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 20 Oct 2020 15:09:00 +0300 Subject: [PATCH] statusbar: delete num buffer chars with Backspace --- src/components/mail/listing.rs | 9 +++++++++ 1 file changed, 9 insertions(+) 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);