From f42ddd8ceea61ed08949d26a720ee5b889c531a1 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 10 Sep 2024 11:50:32 +0800 Subject: [PATCH] fix: hightlight background not updated (#448) --- src/Views/Blame.axaml.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Views/Blame.axaml.cs b/src/Views/Blame.axaml.cs index 027a0bf9..ddd001dd 100644 --- a/src/Views/Blame.axaml.cs +++ b/src/Views/Blame.axaml.cs @@ -321,17 +321,8 @@ namespace SourceGit.Views if (caret == null || caret.Line >= BlameData.LineInfos.Count) return; - var info = BlameData.LineInfos[caret.Line - 1]; - if (_highlight != info.CommitSHA) - { - _highlight = info.CommitSHA; - InvalidateVisual(); - return; - } - - var offset = TextArea.TextView.VerticalOffset; - if (_lastOffsetY != offset) - InvalidateVisual(); + _highlight = BlameData.LineInfos[caret.Line - 1].CommitSHA; + InvalidateVisual(); } private void OnTextAreaPointerWheelChanged(object sender, PointerWheelEventArgs e) @@ -385,7 +376,6 @@ namespace SourceGit.Views private TextMate.Installation _textMate = null; private string _highlight = string.Empty; - private double _lastOffsetY = 0; } public partial class Blame : ChromelessWindow