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 {
201201 self . revlog . update_git ( ev) ?;
202202 self . inspect_commit_popup . update_git ( ev) ?;
203203
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 ( ) ;
208207
209208 Ok ( ( ) )
210209 }
Original file line number Diff line number Diff line change @@ -83,6 +83,18 @@ impl Component for InspectCommitComponent {
8383 . order ( 1 ) ,
8484 ) ;
8585
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+
8698 visibility_blocking ( self )
8799 }
88100
Original file line number Diff line number Diff line change @@ -183,18 +183,17 @@ pub mod commands {
183183 "Add file or path to .gitignore" ,
184184 CMD_GROUP_CHANGES ,
185185 ) ;
186-
187186 ///
188- pub static STATUS_FOCUS_LEFT : CommandText = CommandText :: new (
187+ pub static DIFF_FOCUS_LEFT : CommandText = CommandText :: new (
189188 "Back [\u{2190} ]" , //←
190- "view staged changes " ,
189+ "view and select changed files " ,
191190 CMD_GROUP_GENERAL ,
192191 ) ;
193192 ///
194- pub static STATUS_FOCUS_RIGHT : CommandText = CommandText :: new (
193+ pub static DIFF_FOCUS_RIGHT : CommandText = CommandText :: new (
195194 "Diff [\u{2192} ]" , //→
196195 "inspect file diff" ,
197- CMD_GROUP_CHANGES ,
196+ CMD_GROUP_GENERAL ,
198197 ) ;
199198 ///
200199 pub static QUIT : CommandText = CommandText :: new (
Original file line number Diff line number Diff line change @@ -298,12 +298,12 @@ impl Component for Status {
298298 {
299299 let focus_on_diff = self . focus == Focus :: Diff ;
300300 out. push ( CommandInfo :: new (
301- commands:: STATUS_FOCUS_LEFT ,
301+ commands:: DIFF_FOCUS_LEFT ,
302302 true ,
303303 ( self . visible && focus_on_diff) || force_all,
304304 ) ) ;
305305 out. push ( CommandInfo :: new (
306- commands:: STATUS_FOCUS_RIGHT ,
306+ commands:: DIFF_FOCUS_RIGHT ,
307307 self . can_focus_diff ( ) ,
308308 ( self . visible && !focus_on_diff) || force_all,
309309 ) ) ;
You can’t perform that action at this time.
0 commit comments