From 7dcf93e0b279a7f09a98b44fee88430afa09e149 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Sat, 10 Dec 2022 11:25:11 +0100 Subject: [PATCH] do not show edit item cmd in commit detail: msg fixes #1461 --- CHANGELOG.md | 1 + src/components/inspect_commit.rs | 24 +----------------------- src/components/status_tree.rs | 3 +++ 3 files changed, 5 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 307f6d620c..afbd0db0f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * lag issue when showing files tab ([#1451](https://github.com/extrawurst/gitui/issues/1451)) * fix key binding shown in bottom bar for `stash_open` ([#1454](https://github.com/extrawurst/gitui/issues/1454)) * `--bugreport` does not require param ([#1466](https://github.com/extrawurst/gitui/issues/1466)) +* `edit`-file command shown on commits msg ([#1461](https://github.com/extrawurst/gitui/issues/1461)) ## [0.22.1] - 2022-11-22 diff --git a/src/components/inspect_commit.rs b/src/components/inspect_commit.rs index aa340dd56b..035f0464bf 100644 --- a/src/components/inspect_commit.rs +++ b/src/components/inspect_commit.rs @@ -1,7 +1,7 @@ use super::{ command_pump, event_pump, visibility_blocking, CommandBlocking, CommandInfo, CommitDetailsComponent, Component, DiffComponent, - DrawableComponent, EventState, FileTreeOpen, + DrawableComponent, EventState, }; use crate::{ accessors, @@ -138,12 +138,6 @@ impl Component for InspectCommitComponent { true, true, )); - - out.push(CommandInfo::new( - strings::commands::edit_item(&self.key_config), - true, - true, - )); } visibility_blocking(self) @@ -178,22 +172,6 @@ impl Component for InspectCommitComponent { { self.details.focus(true); self.diff.focus(false); - } else if key_match( - e, - self.key_config.keys.open_file_tree, - ) { - if let Some(commit) = self - .open_request - .as_ref() - .map(|open| open.commit_id) - { - self.hide_stacked(true); - self.queue.push(InternalEvent::OpenPopup( - StackablePopupOpen::FileTree( - FileTreeOpen::new(commit), - ), - )); - } } else if key_match( e, self.key_config.keys.focus_left, diff --git a/src/components/status_tree.rs b/src/components/status_tree.rs index fb752ddf3a..49cd306efe 100644 --- a/src/components/status_tree.rs +++ b/src/components/status_tree.rs @@ -403,6 +403,7 @@ impl Component for StatusTreeComponent { ) .order(order::NAV), ); + out.push( CommandInfo::new( strings::commands::blame_file(&self.key_config), @@ -411,6 +412,7 @@ impl Component for StatusTreeComponent { ) .order(order::RARE_ACTION), ); + out.push( CommandInfo::new( strings::commands::open_file_history( @@ -421,6 +423,7 @@ impl Component for StatusTreeComponent { ) .order(order::RARE_ACTION), ); + out.push( CommandInfo::new( strings::commands::edit_item(&self.key_config),