Skip to content

Commit 1bab597

Browse files
extrawurstIndianBoy42
authored andcommitted
remove duplicate edit cmd from bar (gitui-org#1489)
1 parent 1e07ae3 commit 1bab597

File tree

2 files changed

+3
-26
lines changed

2 files changed

+3
-26
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
* `--bugreport` does not require param ([#1466](https://github.com/extrawurst/gitui/issues/1466))
1919
* `edit`-file command shown on commits msg ([#1461](https://github.com/extrawurst/gitui/issues/1461))
2020
* crash on branches popup in small terminal ([#1470](https://github.com/extrawurst/gitui/issues/1470))
21+
* `edit` command duplication ([#1489](https://github.com/extrawurst/gitui/issues/1489))
2122

2223
## [0.22.1] - 2022-11-22
2324

src/tabs/status.rs

+2-26
Original file line numberDiff line numberDiff line change
@@ -805,19 +805,7 @@ impl Component for Status {
805805
));
806806
}
807807

808-
{
809-
out.push(CommandInfo::new(
810-
strings::commands::edit_item(&self.key_config),
811-
if focus_on_diff {
812-
true
813-
} else {
814-
self.can_focus_diff()
815-
},
816-
self.visible || force_all,
817-
));
818-
819-
self.commands_nav(out, force_all);
820-
}
808+
self.commands_nav(out, force_all);
821809

822810
visibility_blocking(self)
823811
}
@@ -836,19 +824,7 @@ impl Component for Status {
836824
}
837825

838826
if let Event::Key(k) = ev {
839-
return if key_match(k, self.key_config.keys.edit_file)
840-
&& (self.can_focus_diff()
841-
|| self.is_focus_on_diff())
842-
{
843-
if let Some((path, _)) = self.selected_path() {
844-
self.queue.push(
845-
InternalEvent::OpenExternalEditor(Some(
846-
path,
847-
)),
848-
);
849-
}
850-
Ok(EventState::Consumed)
851-
} else if key_match(
827+
return if key_match(
852828
k,
853829
self.key_config.keys.open_commit,
854830
) && self.can_commit()

0 commit comments

Comments
 (0)