enhance: supports use Shift+Enter on popups

This commit is contained in:
leo 2024-06-27 11:38:51 +08:00
parent 40cf5608d3
commit 43af8c49a1
No known key found for this signature in database

View file

@ -114,8 +114,7 @@ namespace SourceGit.Views
private void OnSubjectTextBoxPreviewKeyDown(object sender, KeyEventArgs e) private void OnSubjectTextBoxPreviewKeyDown(object sender, KeyEventArgs e)
{ {
if ((e.Key == Key.Enter && e.KeyModifiers == KeyModifiers.None) if (e.Key == Key.Enter || (e.Key == Key.Right && SubjectEditor.CaretIndex == Subject.Length))
|| (e.Key == Key.Right && SubjectEditor.CaretIndex == Subject.Length))
{ {
DescriptionEditor.Focus(); DescriptionEditor.Focus();
DescriptionEditor.CaretIndex = 0; DescriptionEditor.CaretIndex = 0;