Skip to content

Commit 7dcf93e

Browse files
committed
do not show edit item cmd in commit detail: msg
fixes #1461
1 parent e8b7097 commit 7dcf93e

File tree

3 files changed

+5
-23
lines changed

3 files changed

+5
-23
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
* lag issue when showing files tab ([#1451](https://github.com/extrawurst/gitui/issues/1451))
1717
* fix key binding shown in bottom bar for `stash_open` ([#1454](https://github.com/extrawurst/gitui/issues/1454))
1818
* `--bugreport` does not require param ([#1466](https://github.com/extrawurst/gitui/issues/1466))
19+
* `edit`-file command shown on commits msg ([#1461](https://github.com/extrawurst/gitui/issues/1461))
1920

2021
## [0.22.1] - 2022-11-22
2122

src/components/inspect_commit.rs

+1-23
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::{
22
command_pump, event_pump, visibility_blocking, CommandBlocking,
33
CommandInfo, CommitDetailsComponent, Component, DiffComponent,
4-
DrawableComponent, EventState, FileTreeOpen,
4+
DrawableComponent, EventState,
55
};
66
use crate::{
77
accessors,
@@ -138,12 +138,6 @@ impl Component for InspectCommitComponent {
138138
true,
139139
true,
140140
));
141-
142-
out.push(CommandInfo::new(
143-
strings::commands::edit_item(&self.key_config),
144-
true,
145-
true,
146-
));
147141
}
148142

149143
visibility_blocking(self)
@@ -178,22 +172,6 @@ impl Component for InspectCommitComponent {
178172
{
179173
self.details.focus(true);
180174
self.diff.focus(false);
181-
} else if key_match(
182-
e,
183-
self.key_config.keys.open_file_tree,
184-
) {
185-
if let Some(commit) = self
186-
.open_request
187-
.as_ref()
188-
.map(|open| open.commit_id)
189-
{
190-
self.hide_stacked(true);
191-
self.queue.push(InternalEvent::OpenPopup(
192-
StackablePopupOpen::FileTree(
193-
FileTreeOpen::new(commit),
194-
),
195-
));
196-
}
197175
} else if key_match(
198176
e,
199177
self.key_config.keys.focus_left,

src/components/status_tree.rs

+3
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ impl Component for StatusTreeComponent {
403403
)
404404
.order(order::NAV),
405405
);
406+
406407
out.push(
407408
CommandInfo::new(
408409
strings::commands::blame_file(&self.key_config),
@@ -411,6 +412,7 @@ impl Component for StatusTreeComponent {
411412
)
412413
.order(order::RARE_ACTION),
413414
);
415+
414416
out.push(
415417
CommandInfo::new(
416418
strings::commands::open_file_history(
@@ -421,6 +423,7 @@ impl Component for StatusTreeComponent {
421423
)
422424
.order(order::RARE_ACTION),
423425
);
426+
424427
out.push(
425428
CommandInfo::new(
426429
strings::commands::edit_item(&self.key_config),

0 commit comments

Comments
 (0)