File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ use ratatui::{
23
23
Frame ,
24
24
} ;
25
25
26
+ use super :: FileTreeOpen ;
27
+
26
28
#[ derive( Clone , Debug ) ]
27
29
pub struct InspectCommitOpen {
28
30
pub commit_id : CommitId ,
@@ -169,6 +171,24 @@ impl Component for InspectCommitPopup {
169
171
} else if key_match ( e, self . key_config . keys . move_left )
170
172
{
171
173
self . hide_stacked ( false ) ;
174
+ } else if key_match (
175
+ e,
176
+ self . key_config . keys . open_file_tree ,
177
+ ) {
178
+ if let Some ( commit_id) = self
179
+ . open_request
180
+ . as_ref ( )
181
+ . map ( |open_commit| open_commit. commit_id )
182
+ {
183
+ self . hide_stacked ( true ) ;
184
+ self . queue . push ( InternalEvent :: OpenPopup (
185
+ StackablePopupOpen :: FileTree (
186
+ FileTreeOpen :: new ( commit_id) ,
187
+ ) ,
188
+ ) ) ;
189
+ return Ok ( EventState :: Consumed ) ;
190
+ }
191
+ return Ok ( EventState :: NotConsumed ) ;
172
192
}
173
193
174
194
return Ok ( EventState :: Consumed ) ;
You can’t perform that action at this time.
0 commit comments