mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
merge pull request !29
* feature<Commit>: use "ctrl+ enter" to apply commit
This commit is contained in:
parent
73057a4adc
commit
eec87f17cd
2 changed files with 10 additions and 0 deletions
|
@ -179,6 +179,7 @@
|
|||
AcceptsReturn="True"
|
||||
AcceptsTab="True"
|
||||
TextWrapping="Wrap"
|
||||
KeyDown="CommitMessageKeyDown"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
Placeholder="{DynamicResource Text.WorkingCopy.CommitMessageTip}"
|
||||
|
|
|
@ -4,6 +4,7 @@ using System.Threading.Tasks;
|
|||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace SourceGit.Views.Widgets {
|
||||
/// <summary>
|
||||
|
@ -355,6 +356,14 @@ namespace SourceGit.Views.Widgets {
|
|||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void CommitMessageKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Enter && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control)
|
||||
{
|
||||
Commit(sender, e);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue