Skip to content

Commit 37d2d39

Browse files
committed
remove duplicate edit cmd from bar (#1489)
1 parent 16a7923 commit 37d2d39

File tree

2 files changed

+3
-26
lines changed

2 files changed

+3
-26
lines changed

Diff for: 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

Diff for: src/tabs/status.rs

+2-26
Original file line numberDiff line numberDiff line change
@@ -817,19 +817,7 @@ impl Component for Status {
817817
));
818818
}
819819

820-
{
821-
out.push(CommandInfo::new(
822-
strings::commands::edit_item(&self.key_config),
823-
if focus_on_diff {
824-
true
825-
} else {
826-
self.can_focus_diff()
827-
},
828-
self.visible || force_all,
829-
));
830-
831-
self.commands_nav(out, force_all);
832-
}
820+
self.commands_nav(out, force_all);
833821

834822
visibility_blocking(self)
835823
}
@@ -848,19 +836,7 @@ impl Component for Status {
848836
}
849837

850838
if let Event::Key(k) = ev {
851-
return if key_match(k, self.key_config.keys.edit_file)
852-
&& (self.can_focus_diff()
853-
|| self.is_focus_on_diff())
854-
{
855-
if let Some((path, _)) = self.selected_path() {
856-
self.queue.push(
857-
InternalEvent::OpenExternalEditor(Some(
858-
path,
859-
)),
860-
);
861-
}
862-
Ok(EventState::Consumed)
863-
} else if key_match(
839+
return if key_match(
864840
k,
865841
self.key_config.keys.open_commit,
866842
) && self.can_commit()

0 commit comments

Comments
 (0)