feature<Diff>: highlights differences for modified lines (both added and removed)

This commit is contained in:
leo 2021-07-28 15:02:06 +08:00
parent 776defe6c3
commit 92de6f2b79
7 changed files with 142 additions and 29 deletions

View file

@ -14,11 +14,18 @@ namespace SourceGit.Models {
Deleted,
}
public class HighlightRange {
public int Start { get; set; }
public int Count { get; set; }
public HighlightRange(int p, int n) { Start = p; Count = n; }
}
public class Line {
public LineMode Mode = LineMode.Normal;
public string Content = "";
public string OldLine = "";
public string NewLine = "";
public List<HighlightRange> Highlights = new List<HighlightRange>();
public Line(LineMode mode, string content, string oldLine, string newLine) {
Mode = mode;