Merge pull request !19 from Jai/fix/copy-content-order

* optimix<Diff>: performance optimization
* fix<DiffViewer>: incorrect order when copying file contents
This commit is contained in:
Jai 2021-08-11 11:16:00 +00:00 committed by leo
parent eb2c07b2b6
commit 663f3237c0
3 changed files with 17 additions and 16 deletions

View file

@ -21,6 +21,7 @@ namespace SourceGit.Models {
}
public class Line {
public int Index { get; set; } = 0;
public LineMode Mode { get; set; } = LineMode.None;
public string Content { get; set; } = "";
public string OldLine { get; set; } = "";
@ -45,7 +46,8 @@ namespace SourceGit.Models {
public Line() { }
public Line(LineMode mode, string content, string oldLine, string newLine) {
public Line(int index, LineMode mode, string content, string oldLine, string newLine) {
Index = index;
Mode = mode;
Content = content;
OldLine = oldLine;