@@ -246,59 +246,61 @@ impl Component for Status {
246
246
out : & mut Vec < CommandInfo > ,
247
247
force_all : bool ,
248
248
) -> CommandBlocking {
249
- for c in self . components ( ) {
250
- if c. commands ( out, force_all)
251
- != CommandBlocking :: PassingOn
252
- && !force_all
249
+ if self . visible {
250
+ for c in self . components ( ) {
251
+ if c. commands ( out, force_all)
252
+ != CommandBlocking :: PassingOn
253
+ && !force_all
254
+ {
255
+ break ;
256
+ }
257
+ }
258
+
253
259
{
254
- break ;
260
+ let focus_on_diff = self . focus == Focus :: Diff ;
261
+ out. push ( CommandInfo :: new (
262
+ commands:: STATUS_FOCUS_LEFT ,
263
+ true ,
264
+ ( self . visible && focus_on_diff) || force_all,
265
+ ) ) ;
266
+ out. push ( CommandInfo :: new (
267
+ commands:: STATUS_FOCUS_RIGHT ,
268
+ self . can_focus_diff ( ) ,
269
+ ( self . visible && !focus_on_diff) || force_all,
270
+ ) ) ;
255
271
}
256
- }
257
272
258
- {
259
- let focus_on_diff = self . focus == Focus :: Diff ;
260
- out. push ( CommandInfo :: new (
261
- commands:: STATUS_FOCUS_LEFT ,
262
- true ,
263
- ( self . visible && focus_on_diff) || force_all,
264
- ) ) ;
265
- out. push ( CommandInfo :: new (
266
- commands:: STATUS_FOCUS_RIGHT ,
267
- self . can_focus_diff ( ) ,
268
- ( self . visible && !focus_on_diff) || force_all,
269
- ) ) ;
273
+ out. push (
274
+ CommandInfo :: new (
275
+ commands:: SELECT_STATUS ,
276
+ true ,
277
+ ( self . visible && self . focus == Focus :: Diff )
278
+ || force_all,
279
+ )
280
+ . hidden ( ) ,
281
+ ) ;
282
+
283
+ out. push (
284
+ CommandInfo :: new (
285
+ commands:: SELECT_STAGING ,
286
+ true ,
287
+ ( self . visible && self . focus == Focus :: WorkDir )
288
+ || force_all,
289
+ )
290
+ . order ( -2 ) ,
291
+ ) ;
292
+
293
+ out. push (
294
+ CommandInfo :: new (
295
+ commands:: SELECT_UNSTAGED ,
296
+ true ,
297
+ ( self . visible && self . focus == Focus :: Stage )
298
+ || force_all,
299
+ )
300
+ . order ( -2 ) ,
301
+ ) ;
270
302
}
271
303
272
- out. push (
273
- CommandInfo :: new (
274
- commands:: SELECT_STATUS ,
275
- true ,
276
- ( self . visible && self . focus == Focus :: Diff )
277
- || force_all,
278
- )
279
- . hidden ( ) ,
280
- ) ;
281
-
282
- out. push (
283
- CommandInfo :: new (
284
- commands:: SELECT_STAGING ,
285
- true ,
286
- ( self . visible && self . focus == Focus :: WorkDir )
287
- || force_all,
288
- )
289
- . order ( -2 ) ,
290
- ) ;
291
-
292
- out. push (
293
- CommandInfo :: new (
294
- commands:: SELECT_UNSTAGED ,
295
- true ,
296
- ( self . visible && self . focus == Focus :: Stage )
297
- || force_all,
298
- )
299
- . order ( -2 ) ,
300
- ) ;
301
-
302
304
if self . visible {
303
305
CommandBlocking :: Blocking
304
306
} else {
0 commit comments