Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/popups/inspect_commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl Component for InspectCommitPopup {
CommandInfo::new(
strings::commands::close_popup(&self.key_config),
true,
true,
!self.diff.focused() || force_all,
)
.order(1),
);
Expand All @@ -123,11 +123,14 @@ impl Component for InspectCommitPopup {
!self.diff.focused() || force_all,
));

out.push(CommandInfo::new(
strings::commands::close_popup(&self.key_config),
true,
self.diff.focused() || force_all,
));
out.push(
CommandInfo::new(
strings::commands::back_popup(&self.key_config),
true,
self.diff.focused() || force_all,
)
.order(1),
);

out.push(CommandInfo::new(
strings::commands::inspect_file_tree(
Expand Down
10 changes: 10 additions & 0 deletions src/strings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,16 @@ pub mod commands {
CMD_GROUP_GENERAL,
)
}
pub fn back_popup(key_config: &SharedKeyConfig) -> CommandText {
CommandText::new(
format!(
"Back [{}]",
key_config.get_hint(key_config.keys.exit_popup),
),
"return to previous view",
CMD_GROUP_GENERAL,
)
}
pub fn scroll_popup(key_config: &SharedKeyConfig) -> CommandText {
CommandText::new(
format!(
Expand Down