diff --git a/src/Models/DiffResult.cs b/src/Models/DiffResult.cs index d99c7a0e..3cc33f59 100644 --- a/src/Models/DiffResult.cs +++ b/src/Models/DiffResult.cs @@ -63,8 +63,8 @@ namespace SourceGit.Models { public string File { get; set; } = string.Empty; public List Lines { get; set; } = new List(); + public Vector SyncScrollOffset { get; set; } = Vector.Zero; public int MaxLineNumber = 0; - public Vector SyncScrollOffset = Vector.Zero; public void GenerateNewPatchFromSelection(Change change, string fileBlobGuid, TextDiffSelection selection, bool revert, string output) { diff --git a/src/Views/DiffView.axaml b/src/Views/DiffView.axaml index adffabda..96af72cb 100644 --- a/src/Views/DiffView.axaml +++ b/src/Views/DiffView.axaml @@ -224,6 +224,7 @@ diff --git a/src/Views/TextDiffView.axaml.cs b/src/Views/TextDiffView.axaml.cs index fc1bc211..0edfd47f 100644 --- a/src/Views/TextDiffView.axaml.cs +++ b/src/Views/TextDiffView.axaml.cs @@ -1169,19 +1169,11 @@ namespace SourceGit.Views if (change.Property == TextDiffProperty) { if (TextDiff == null) - { Content = null; - } else if (UseSideBySideDiff) - { Content = new ViewModels.TwoSideTextDiff(TextDiff); - SyncScrollOffset = TextDiff.SyncScrollOffset; - } else - { Content = TextDiff; - SyncScrollOffset = TextDiff.SyncScrollOffset; - } } else if (change.Property == UseSideBySideDiffProperty) { @@ -1194,11 +1186,6 @@ namespace SourceGit.Views else Content = TextDiff; } - else if (change.Property == SyncScrollOffsetProperty) - { - if (TextDiff != null) - TextDiff.SyncScrollOffset = SyncScrollOffset; - } } private Models.TextDiffSelection GetUnifiedSelection(int startLine, int endLine, bool isOldSide)