Skip to content

Commit f40d368

Browse files
martihomssolerextrawurst
authored andcommitted
fix: 2114
1 parent b7b7705 commit f40d368

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/popups/inspect_commit.rs

+20
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ use ratatui::{
2323
Frame,
2424
};
2525

26+
use super::FileTreeOpen;
27+
2628
#[derive(Clone, Debug)]
2729
pub struct InspectCommitOpen {
2830
pub commit_id: CommitId,
@@ -169,6 +171,24 @@ impl Component for InspectCommitPopup {
169171
} else if key_match(e, self.key_config.keys.move_left)
170172
{
171173
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);
172192
}
173193

174194
return Ok(EventState::Consumed);

0 commit comments

Comments
 (0)