mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-02 01:34:58 +00:00
fix: blame highlight background did not update when using scrollbar (#1354)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
0ae39faad1
commit
492da8dd57
1 changed files with 2 additions and 16 deletions
|
@ -296,8 +296,6 @@ namespace SourceGit.Views
|
|||
TextArea.LeftMargins.Add(new CommitInfoMargin(this) { Margin = new Thickness(8, 0) });
|
||||
TextArea.LeftMargins.Add(new VerticalSeparatorMargin(this));
|
||||
TextArea.Caret.PositionChanged += OnTextAreaCaretPositionChanged;
|
||||
TextArea.LayoutUpdated += OnTextAreaLayoutUpdated;
|
||||
TextArea.PointerWheelChanged += OnTextAreaPointerWheelChanged;
|
||||
TextArea.TextView.ContextRequested += OnTextViewContextRequested;
|
||||
TextArea.TextView.VisualLinesChanged += OnTextViewVisualLinesChanged;
|
||||
TextArea.TextView.Margin = new Thickness(4, 0);
|
||||
|
@ -341,8 +339,6 @@ namespace SourceGit.Views
|
|||
|
||||
TextArea.LeftMargins.Clear();
|
||||
TextArea.Caret.PositionChanged -= OnTextAreaCaretPositionChanged;
|
||||
TextArea.LayoutUpdated -= OnTextAreaLayoutUpdated;
|
||||
TextArea.PointerWheelChanged -= OnTextAreaPointerWheelChanged;
|
||||
TextArea.TextView.ContextRequested -= OnTextViewContextRequested;
|
||||
TextArea.TextView.VisualLinesChanged -= OnTextViewVisualLinesChanged;
|
||||
|
||||
|
@ -392,18 +388,6 @@ namespace SourceGit.Views
|
|||
InvalidateVisual();
|
||||
}
|
||||
|
||||
private void OnTextAreaLayoutUpdated(object sender, EventArgs e)
|
||||
{
|
||||
if (TextArea.IsFocused)
|
||||
InvalidateVisual();
|
||||
}
|
||||
|
||||
private void OnTextAreaPointerWheelChanged(object sender, PointerWheelEventArgs e)
|
||||
{
|
||||
if (!TextArea.IsFocused && !string.IsNullOrEmpty(_highlight))
|
||||
Focus();
|
||||
}
|
||||
|
||||
private void OnTextViewContextRequested(object sender, ContextRequestedEventArgs e)
|
||||
{
|
||||
var selected = SelectedText;
|
||||
|
@ -445,6 +429,8 @@ namespace SourceGit.Views
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
InvalidateVisual();
|
||||
}
|
||||
|
||||
private TextMate.Installation _textMate = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue