From 388a6e62fb61aebdd250c3528cf8f765f1f94561 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Tue, 23 Feb 2021 11:21:45 +0100 Subject: [PATCH] keep uncommitted msg around. when adding *amend* this got broken because in that case we want to clear out the msg when it was not confirmed --- src/components/commit.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/commit.rs b/src/components/commit.rs index 13a09f38..3678e487 100644 --- a/src/components/commit.rs +++ b/src/components/commit.rs @@ -112,9 +112,11 @@ impl Component for CommitComponent { } fn show(&mut self) -> Result<()> { + if self.amend.is_some() { + self.input.clear(); + } self.amend = None; - self.input.clear(); self.input .set_title(strings::commit_title(&self.key_config)); self.input.show()?;