Skip to content

Commit 55da62f

Browse files
committed
Close GitTfsDialog when escape key is pressed.
1 parent 43f508c commit 55da62f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

GitTfsDialog.Designer.cs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GitTfsDialog.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ public GitTfsDialog(IGitUICommands commands, SettingsContainer settings, IEnumer
1919
InitializeComponent();
2020
TfsRemoteComboBox.DataSource = tfsRemotes.ToList();
2121
InitializeFromSettings();
22+
23+
this.KeyDown += (o, e) =>
24+
{
25+
if (e.KeyCode == Keys.Escape)
26+
{
27+
this.DialogResult = DialogResult.Cancel;
28+
this.Close();
29+
}
30+
};
2231
}
2332

2433
private void InitializeFromSettings()

0 commit comments

Comments
 (0)