diff --git a/src/SourceGit/Models/DiffResult.cs b/src/SourceGit/Models/DiffResult.cs index 1c73aa5b..6d6017e7 100644 --- a/src/SourceGit/Models/DiffResult.cs +++ b/src/SourceGit/Models/DiffResult.cs @@ -380,8 +380,6 @@ namespace SourceGit.Models private bool ProcessIndicatorForPatch(StringBuilder builder, TextDiffLine indicator, int idx, int start, int end, int ignoreRemoves, int ignoreAdds, bool revert, bool tailed) { - - var match = indicatorRegex().Match(indicator.Content); var oldStart = int.Parse(match.Groups[1].Value); var newStart = int.Parse(match.Groups[2].Value) + ignoreRemoves - ignoreAdds; @@ -449,7 +447,6 @@ namespace SourceGit.Models private bool ProcessIndicatorForPatchSingleSide(StringBuilder builder, TextDiffLine indicator, int idx, int start, int end, int ignoreRemoves, int ignoreAdds, bool revert, bool isOldSide, bool tailed) { - var match = indicatorRegex().Match(indicator.Content); var oldStart = int.Parse(match.Groups[1].Value); var newStart = int.Parse(match.Groups[2].Value) + ignoreRemoves - ignoreAdds; @@ -550,6 +547,10 @@ namespace SourceGit.Models public long NewSize { get; set; } = 0; } + public class NoOrEOLChange + { + } + public class DiffResult { public bool IsBinary { get; set; } = false; diff --git a/src/SourceGit/ViewModels/DiffContext.cs b/src/SourceGit/ViewModels/DiffContext.cs index c0654c82..ef3f63e3 100644 --- a/src/SourceGit/ViewModels/DiffContext.cs +++ b/src/SourceGit/ViewModels/DiffContext.cs @@ -131,6 +131,7 @@ namespace SourceGit.ViewModels } else { + Content = new Models.NoOrEOLChange(); IsTextDiff = false; IsNoChange = true; } diff --git a/src/SourceGit/Views/DiffView.axaml b/src/SourceGit/Views/DiffView.axaml index 6924d6c6..e3933839 100644 --- a/src/SourceGit/Views/DiffView.axaml +++ b/src/SourceGit/Views/DiffView.axaml @@ -52,18 +52,6 @@ - - - - - - - - @@ -125,6 +113,18 @@ + + + + + + + +