fix: hightlight background not updated (#448)

This commit is contained in:
leo 2024-09-10 11:50:32 +08:00
parent 2e2c443b5d
commit f42ddd8cee
No known key found for this signature in database

View file

@ -321,17 +321,8 @@ namespace SourceGit.Views
if (caret == null || caret.Line >= BlameData.LineInfos.Count) if (caret == null || caret.Line >= BlameData.LineInfos.Count)
return; return;
var info = BlameData.LineInfos[caret.Line - 1]; _highlight = BlameData.LineInfos[caret.Line - 1].CommitSHA;
if (_highlight != info.CommitSHA) InvalidateVisual();
{
_highlight = info.CommitSHA;
InvalidateVisual();
return;
}
var offset = TextArea.TextView.VerticalOffset;
if (_lastOffsetY != offset)
InvalidateVisual();
} }
private void OnTextAreaPointerWheelChanged(object sender, PointerWheelEventArgs e) private void OnTextAreaPointerWheelChanged(object sender, PointerWheelEventArgs e)
@ -385,7 +376,6 @@ namespace SourceGit.Views
private TextMate.Installation _textMate = null; private TextMate.Installation _textMate = null;
private string _highlight = string.Empty; private string _highlight = string.Empty;
private double _lastOffsetY = 0;
} }
public partial class Blame : ChromelessWindow public partial class Blame : ChromelessWindow