statusbar: delete num buffer chars with Backspace
parent
126ed8a189
commit
9f39a7c5a1
|
@ -1229,6 +1229,15 @@ impl Component for Listing {
|
||||||
self.get_status(context),
|
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() => {
|
UIEvent::Input(Key::Esc) | UIEvent::Input(Key::Alt('')) if !self.cmd_buf.is_empty() => {
|
||||||
self.cmd_buf.clear();
|
self.cmd_buf.clear();
|
||||||
self.component.set_command_modifier(false);
|
self.component.set_command_modifier(false);
|
||||||
|
|
Loading…
Reference in New Issue