diff --git a/src/Views/CommitMessageEditor.axaml b/src/Views/CommitMessageEditor.axaml
index c5345c3c..28a07636 100644
--- a/src/Views/CommitMessageEditor.axaml
+++ b/src/Views/CommitMessageEditor.axaml
@@ -37,12 +37,10 @@
-
+
diff --git a/src/Views/CommitMessageEditor.axaml.cs b/src/Views/CommitMessageEditor.axaml.cs
index 73ebf6bf..42fd6a12 100644
--- a/src/Views/CommitMessageEditor.axaml.cs
+++ b/src/Views/CommitMessageEditor.axaml.cs
@@ -60,19 +60,18 @@ namespace SourceGit.Views
{
base.OnClosed(e);
+ _onSave?.Invoke(Editor.CommitMessage);
+
if (_shouldExitApp)
- App.Quit(_exitCode);
+ App.Quit(0);
}
- private void SaveAndClose(object _1, RoutedEventArgs _2)
+ private void OnCloseByHotKey(object sender, RoutedEventArgs e)
{
- _onSave?.Invoke(Editor.CommitMessage);
- _exitCode = 0;
Close();
}
private Action _onSave = null;
private bool _shouldExitApp = true;
- private int _exitCode = -1;
}
}