File tree Expand file tree Collapse file tree 4 files changed +21
-11
lines changed Expand file tree Collapse file tree 4 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -201,10 +201,9 @@ impl App {
201
201
self . revlog . update_git ( ev) ?;
202
202
self . inspect_commit_popup . update_git ( ev) ?;
203
203
204
- if let AsyncNotification :: Status = ev {
205
- //TODO: is that needed?
206
- self . update_commands ( )
207
- }
204
+ //TODO: better system for this
205
+ // can we simply process the queue here and everyone just uses the queue to schedule a cmd update?
206
+ self . update_commands ( ) ;
208
207
209
208
Ok ( ( ) )
210
209
}
Original file line number Diff line number Diff line change @@ -83,6 +83,18 @@ impl Component for InspectCommitComponent {
83
83
. order ( 1 ) ,
84
84
) ;
85
85
86
+ out. push ( CommandInfo :: new (
87
+ commands:: DIFF_FOCUS_RIGHT ,
88
+ self . can_focus_diff ( ) ,
89
+ ( self . is_visible ( ) && !self . diff . focused ( ) ) || force_all,
90
+ ) ) ;
91
+
92
+ out. push ( CommandInfo :: new (
93
+ commands:: DIFF_FOCUS_LEFT ,
94
+ true ,
95
+ ( self . is_visible ( ) && self . diff . focused ( ) ) || force_all,
96
+ ) ) ;
97
+
86
98
visibility_blocking ( self )
87
99
}
88
100
Original file line number Diff line number Diff line change @@ -183,18 +183,17 @@ pub mod commands {
183
183
"Add file or path to .gitignore" ,
184
184
CMD_GROUP_CHANGES ,
185
185
) ;
186
-
187
186
///
188
- pub static STATUS_FOCUS_LEFT : CommandText = CommandText :: new (
187
+ pub static DIFF_FOCUS_LEFT : CommandText = CommandText :: new (
189
188
"Back [\u{2190} ]" , //←
190
- "view staged changes " ,
189
+ "view and select changed files " ,
191
190
CMD_GROUP_GENERAL ,
192
191
) ;
193
192
///
194
- pub static STATUS_FOCUS_RIGHT : CommandText = CommandText :: new (
193
+ pub static DIFF_FOCUS_RIGHT : CommandText = CommandText :: new (
195
194
"Diff [\u{2192} ]" , //→
196
195
"inspect file diff" ,
197
- CMD_GROUP_CHANGES ,
196
+ CMD_GROUP_GENERAL ,
198
197
) ;
199
198
///
200
199
pub static QUIT : CommandText = CommandText :: new (
Original file line number Diff line number Diff line change @@ -298,12 +298,12 @@ impl Component for Status {
298
298
{
299
299
let focus_on_diff = self . focus == Focus :: Diff ;
300
300
out. push ( CommandInfo :: new (
301
- commands:: STATUS_FOCUS_LEFT ,
301
+ commands:: DIFF_FOCUS_LEFT ,
302
302
true ,
303
303
( self . visible && focus_on_diff) || force_all,
304
304
) ) ;
305
305
out. push ( CommandInfo :: new (
306
- commands:: STATUS_FOCUS_RIGHT ,
306
+ commands:: DIFF_FOCUS_RIGHT ,
307
307
self . can_focus_diff ( ) ,
308
308
( self . visible && !focus_on_diff) || force_all,
309
309
) ) ;
You can’t perform that action at this time.
0 commit comments