summaryrefslogtreecommitdiffstats
path: root/src/tabs
diff options
context:
space:
mode:
authorextrawurst <776816+extrawurst@users.noreply.github.com>2023-02-04 16:15:26 +0100
committerGitHub <noreply@github.com>2023-02-04 16:15:26 +0100
commit8ab62244cea8fbdb13e3b6114f96a1480e70a1a4 (patch)
tree93dfa3c357722decb7d1122c02cf1a05eddfc94a /src/tabs
parent1a0167e7f877b40271cce5a7b57ecd4ad6389bb0 (diff)
support reset from log view (#1534)
Diffstat (limited to 'src/tabs')
-rw-r--r--src/tabs/revlog.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tabs/revlog.rs b/src/tabs/revlog.rs
index 0b0ad7d4..a7886207 100644
--- a/src/tabs/revlog.rs
+++ b/src/tabs/revlog.rs
@@ -329,6 +329,19 @@ impl Component for Revlog {
return Ok(EventState::Consumed);
} else if key_match(
k,
+ self.key_config.keys.log_reset_comit,
+ ) {
+ return self.selected_commit().map_or(
+ Ok(EventState::NotConsumed),
+ |id| {
+ self.queue.push(
+ InternalEvent::OpenResetPopup(id),
+ );
+ Ok(EventState::Consumed)
+ },
+ );
+ } else if key_match(
+ k,
self.key_config.keys.compare_commits,
) && self.list.marked_count() > 0
{
@@ -449,6 +462,12 @@ impl Component for Revlog {
self.visible || force_all,
));
+ out.push(CommandInfo::new(
+ strings::commands::log_reset_commit(&self.key_config),
+ self.selected_commit().is_some(),
+ self.visible || force_all,
+ ));
+
visibility_blocking(self)
}