mirror of
https://git.meli.delivery/meli/meli
synced 2024-10-30 21:20:34 +00:00
EXECUTE: cancel command with Esc
This commit is contained in:
parent
989cfcc877
commit
b20bdea8f0
@ -423,7 +423,7 @@ fn run_app(opt: Opt) -> Result<()> {
|
||||
}
|
||||
UIMode::Execute => {
|
||||
match k {
|
||||
Key::Char('\n') | Key::Esc => {
|
||||
Key::Char('\n') => {
|
||||
state.mode = UIMode::Normal;
|
||||
state.rcv_event(UIEvent::ChangeMode(UIMode::Normal));
|
||||
state.redraw();
|
||||
|
@ -1148,6 +1148,13 @@ impl Component for StatusBar {
|
||||
.process_event(&mut UIEvent::InsertInput(k.clone()), context);
|
||||
return true;
|
||||
}
|
||||
UIEvent::ExInput(Key::Esc) => {
|
||||
self.ex_buffer.clear();
|
||||
context
|
||||
.replies
|
||||
.push_back(UIEvent::ChangeMode(UIMode::Normal));
|
||||
return true;
|
||||
}
|
||||
UIEvent::Resize => {
|
||||
self.dirty = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user