File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -172,10 +172,6 @@ impl App {
172172 flags. insert ( NeedsUpdate :: COMMANDS ) ;
173173 } else if let Event :: Key ( k) = ev {
174174 let new_flags = match k {
175- keys:: EXIT => {
176- self . do_quit = true ;
177- NeedsUpdate :: empty ( )
178- }
179175 keys:: FOCUS_WORKDIR => {
180176 self . switch_focus ( Focus :: WorkDir )
181177 }
@@ -206,6 +202,8 @@ impl App {
206202 flags. insert ( new_flags) ;
207203 }
208204
205+ self . check_quit ( ev) ;
206+
209207 let new_flags = self . process_queue ( ) ;
210208 flags. insert ( new_flags) ;
211209
@@ -298,6 +296,17 @@ impl App {
298296 None
299297 }
300298
299+ fn check_quit ( & mut self , ev : Event ) {
300+ if let Event :: Key ( e) = ev {
301+ match e {
302+ keys:: EXIT => {
303+ self . do_quit = true ;
304+ }
305+ _ => ( ) ,
306+ }
307+ }
308+ }
309+
301310 fn toggle_tabs ( & mut self ) {
302311 self . tab += 1 ;
303312 self . tab %= 2 ;
You can’t perform that action at this time.
0 commit comments