diff --git a/src/app.rs b/src/app.rs index 3b08d00284..baaa78c7c6 100644 --- a/src/app.rs +++ b/src/app.rs @@ -172,10 +172,6 @@ impl App { flags.insert(NeedsUpdate::COMMANDS); } else if let Event::Key(k) = ev { let new_flags = match k { - keys::EXIT => { - self.do_quit = true; - NeedsUpdate::empty() - } keys::FOCUS_WORKDIR => { self.switch_focus(Focus::WorkDir) } @@ -206,6 +202,8 @@ impl App { flags.insert(new_flags); } + self.check_quit(ev); + let new_flags = self.process_queue(); flags.insert(new_flags); @@ -298,6 +296,17 @@ impl App { None } + fn check_quit(&mut self, ev: Event) { + if let Event::Key(e) = ev { + match e { + keys::EXIT => { + self.do_quit = true; + } + _ => (), + } + } + } + fn toggle_tabs(&mut self) { self.tab += 1; self.tab %= 2;