mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -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"
|
AcceptsReturn="True"
|
||||||
AcceptsTab="True"
|
AcceptsTab="True"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
|
KeyDown="CommitMessageKeyDown"
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
Placeholder="{DynamicResource Text.WorkingCopy.CommitMessageTip}"
|
Placeholder="{DynamicResource Text.WorkingCopy.CommitMessageTip}"
|
||||||
|
|
|
@ -4,6 +4,7 @@ using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Controls.Primitives;
|
using System.Windows.Controls.Primitives;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace SourceGit.Views.Widgets {
|
namespace SourceGit.Views.Widgets {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -355,6 +356,14 @@ namespace SourceGit.Views.Widgets {
|
||||||
|
|
||||||
e.Handled = true;
|
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
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue