diff --git a/GitUI/CommandsDialogs/FormCommit.Designer.cs b/GitUI/CommandsDialogs/FormCommit.Designer.cs index 8345f924a8c..ffc7b4705d7 100644 --- a/GitUI/CommandsDialogs/FormCommit.Designer.cs +++ b/GitUI/CommandsDialogs/FormCommit.Designer.cs @@ -1104,7 +1104,6 @@ private void InitializeComponent() this.Message.SelectionChanged += new System.EventHandler(this.Message_SelectionChanged); this.Message.Enter += new System.EventHandler(this.Message_Enter); this.Message.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Message_KeyDown); - this.Message.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Message_KeyUp); // // flowCommitButtons // diff --git a/GitUI/CommandsDialogs/FormCommit.cs b/GitUI/CommandsDialogs/FormCommit.cs index d55f32eb72f..149a78c34ff 100644 --- a/GitUI/CommandsDialogs/FormCommit.cs +++ b/GitUI/CommandsDialogs/FormCommit.cs @@ -866,7 +866,7 @@ protected override CommandStatus ExecuteCommand(int cmd) case Command.Refresh: RescanChanges(); return true; case Command.SelectNext: case Command.SelectNext_AlternativeHotkey1: - case Command.SelectNext_AlternativeHotkey2: MoveSelection(1); return true; + case Command.SelectNext_AlternativeHotkey2: MoveSelection(1); return true; case Command.SelectPrevious: case Command.SelectPrevious_AlternativeHotkey1: case Command.SelectPrevious_AlternativeHotkey2: MoveSelection(-1); return true; @@ -2818,16 +2818,6 @@ private void ViewFileHistoryMenuItem_Click(object sender, EventArgs e) } } - private void Message_KeyUp(object sender, KeyEventArgs e) - { - // Ctrl + Enter = Commit - if (e.Control && e.KeyCode == Keys.Enter) - { - ExecuteCommitCommand(); - e.Handled = true; - } - } - private void ExecuteCommitCommand() { CheckForStagedAndCommit(amend: Amend.Checked, push: false, resetAuthor: Amend.Checked && ResetAuthor.Checked); @@ -2835,9 +2825,9 @@ private void ExecuteCommitCommand() private void Message_KeyDown(object sender, KeyEventArgs e) { - // Prevent adding a line break when all we want is to commit if (e.Control && e.KeyCode == Keys.Enter) { + ExecuteCommitCommand(); e.Handled = true; } } diff --git a/contributors.txt b/contributors.txt index dd84a427e97..f8d77fa143a 100644 --- a/contributors.txt +++ b/contributors.txt @@ -186,3 +186,4 @@ YYYY/MM/DD, github id, Full name, email 2022/11/30, SaumyaBhushan, Saumya, saumya@knoldus.com 2022/12/15, siyavash1984,Siyavash Khojasteh, khojasteh(at)outlook.com 2023/01/27, MaxKoll, Maximilian Koll, maximiliankoll(at)web(dot)de +2023/02/24, RauulDev, Raul Molina, remolina7@gmail.com \ No newline at end of file