diff --git a/CHANGELOG.md b/CHANGELOG.md index e218d77d..086d735c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - clearer help headers ([#131](https://github.com/extrawurst/gitui/issues/131)) - diisplay non-utf8 commit messages at least partially ([#150](https://github.com/extrawurst/gitui/issues/150)) - hooks ignored when running `gitui` in subfolder of workdir ([#151](https://github.com/extrawurst/gitui/issues/151)) +- some optimizations in reflog ## [0.7.0] - 2020-06-15 diff --git a/src/components/commit.rs b/src/components/commit.rs index a1b26cca..bfdae54a 100644 --- a/src/components/commit.rs +++ b/src/components/commit.rs @@ -44,17 +44,19 @@ impl Component for CommitComponent { ) -> CommandBlocking { self.input.commands(out, force_all); - out.push(CommandInfo::new( - commands::COMMIT_ENTER, - self.can_commit(), - self.is_visible() || force_all, - )); + if self.is_visible() || force_all { + out.push(CommandInfo::new( + commands::COMMIT_ENTER, + self.can_commit(), + true, + )); - out.push(CommandInfo::new( - commands::COMMIT_AMEND, - self.can_amend(), - self.is_visible() || force_all, - )); + out.push(CommandInfo::new( + commands::COMMIT_AMEND, + self.can_amend(), + true, + )); + } visibility_blocking(self) }