diff --git a/TGit/OutputBox.cs b/TGit/OutputBox.cs index dca15a9..14f8e09 100644 --- a/TGit/OutputBox.cs +++ b/TGit/OutputBox.cs @@ -55,12 +55,7 @@ private void okButton_Click(object sender, EventArgs e) string.Empty, this ); process.WaitForExit(); - if (process.ExitCode == 0) - { - Close(); - richTextBox.Clear(); - okButton.Enabled = false; - } + okButton.Click += OkButton_Click_Close; } else { @@ -70,6 +65,13 @@ private void okButton_Click(object sender, EventArgs e) } } + private void OkButton_Click_Close(object sender, EventArgs e) + { + Close(); + richTextBox.Clear(); + okButton.Enabled = false; + } + private static string FormatCliCommand(string gitCommand, bool appendNextLine = true) { return $"echo ^> {Path.GetFileNameWithoutExtension(FileHelper.GetMSysGit())} {gitCommand} && \"{FileHelper.GetMSysGit()}\" {gitCommand}{(appendNextLine ? " && " : string.Empty)}"; diff --git a/TGit/source.extension.vsixmanifest b/TGit/source.extension.vsixmanifest index be91585..adef7cb 100644 --- a/TGit/source.extension.vsixmanifest +++ b/TGit/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + TGit Control TortoiseGit from within Visual Studio https://github.com/sboulema/TGit