@@ -192,40 +192,40 @@ impl Component for ChangesComponent {
192
192
if self . is_working_dir {
193
193
out. push ( CommandInfo :: new (
194
194
strings:: commands:: stage_all ( & self . key_config ) ,
195
- some_selection ,
196
- self . focused ( ) ,
195
+ true ,
196
+ some_selection && self . focused ( ) ,
197
197
) ) ;
198
198
out. push ( CommandInfo :: new (
199
199
strings:: commands:: stage_item ( & self . key_config ) ,
200
- some_selection ,
201
- self . focused ( ) ,
200
+ true ,
201
+ some_selection && self . focused ( ) ,
202
202
) ) ;
203
203
out. push ( CommandInfo :: new (
204
204
strings:: commands:: reset_item ( & self . key_config ) ,
205
- some_selection ,
206
- self . focused ( ) ,
205
+ true ,
206
+ some_selection && self . focused ( ) ,
207
207
) ) ;
208
208
out. push ( CommandInfo :: new (
209
209
strings:: commands:: ignore_item ( & self . key_config ) ,
210
- some_selection ,
211
- self . focused ( ) ,
210
+ true ,
211
+ some_selection && self . focused ( ) ,
212
212
) ) ;
213
213
} else {
214
214
out. push ( CommandInfo :: new (
215
215
strings:: commands:: unstage_item ( & self . key_config ) ,
216
- some_selection ,
217
- self . focused ( ) ,
216
+ true ,
217
+ some_selection && self . focused ( ) ,
218
218
) ) ;
219
219
out. push ( CommandInfo :: new (
220
220
strings:: commands:: unstage_all ( & self . key_config ) ,
221
- some_selection ,
222
- self . focused ( ) ,
221
+ true ,
222
+ some_selection && self . focused ( ) ,
223
223
) ) ;
224
224
out. push (
225
225
CommandInfo :: new (
226
226
strings:: commands:: commit_open ( & self . key_config ) ,
227
- ! self . is_empty ( ) ,
228
- self . focused ( ) || force_all,
227
+ true ,
228
+ ( ! self . is_empty ( ) && self . focused ( ) ) || force_all,
229
229
)
230
230
. order ( -1 ) ,
231
231
) ;
0 commit comments