diff --git a/src/Models/DiffResult.cs b/src/Models/DiffResult.cs index eafe44ec..71099390 100644 --- a/src/Models/DiffResult.cs +++ b/src/Models/DiffResult.cs @@ -5,6 +5,8 @@ using System.Text.RegularExpressions; using Avalonia; using Avalonia.Media.Imaging; +using CommunityToolkit.Mvvm.ComponentModel; + namespace SourceGit.Models { public enum TextDiffLineType @@ -59,12 +61,17 @@ namespace SourceGit.Models } } - public partial class TextDiff + public partial class TextDiff : ObservableObject { public string File { get; set; } = string.Empty; public List Lines { get; set; } = new List(); public int MaxLineNumber = 0; - public Vector SyncScrollOffset { get; set; } = Vector.Zero; + + private Vector _syncScrollOffset = Vector.Zero; + public Vector SyncScrollOffset { + get => _syncScrollOffset; + set => SetProperty(ref _syncScrollOffset, value); + } public void GenerateNewPatchFromSelection(Change change, string fileBlobGuid, TextDiffSelection selection, bool revert, string output) {