diff --git a/SourceGit/UI/WorkingCopy.xaml b/SourceGit/UI/WorkingCopy.xaml index c4957829..28d79646 100644 --- a/SourceGit/UI/WorkingCopy.xaml +++ b/SourceGit/UI/WorkingCopy.xaml @@ -343,7 +343,8 @@ ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto" helpers:TextBoxHelper.Placeholder="Enter commit message" - helpers:TextBoxHelper.PlaceholderBaseline="Top"> + helpers:TextBoxHelper.PlaceholderBaseline="Top" + PreviewMouseWheel="CommitMsgPreviewMouseWheel"> diff --git a/SourceGit/UI/WorkingCopy.xaml.cs b/SourceGit/UI/WorkingCopy.xaml.cs index 6e0345b8..19201cac 100644 --- a/SourceGit/UI/WorkingCopy.xaml.cs +++ b/SourceGit/UI/WorkingCopy.xaml.cs @@ -683,6 +683,17 @@ namespace SourceGit.UI { #endregion #region COMMIT_PANEL + private void CommitMsgPreviewMouseWheel(object sender, MouseWheelEventArgs e) { + var textBox = sender as TextBox; + if (textBox == null) return; + + if (e.Delta > 0) { + textBox.LineUp(); + } else { + textBox.LineDown(); + } + } + private void OpenCommitMessageSelector(object sender, RoutedEventArgs e) { var anchor = sender as Button;