mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
fix<TextDiffView>: avoid endLine out of range
This commit is contained in:
parent
2b97d7c599
commit
a770ff542d
1 changed files with 1 additions and 0 deletions
|
@ -852,6 +852,7 @@ namespace SourceGit.Views {
|
||||||
var rs = new Models.TextDiffSelection();
|
var rs = new Models.TextDiffSelection();
|
||||||
var diff = TextDiff;
|
var diff = TextDiff;
|
||||||
|
|
||||||
|
endLine = Math.Min(endLine, TextDiff.Lines.Count);
|
||||||
if (Content is ViewModels.TwoSideTextDiff twoSides) {
|
if (Content is ViewModels.TwoSideTextDiff twoSides) {
|
||||||
var target = isOldSide ? twoSides.Old : twoSides.New;
|
var target = isOldSide ? twoSides.Old : twoSides.New;
|
||||||
var firstContentLine = -1;
|
var firstContentLine = -1;
|
||||||
|
|
Loading…
Reference in a new issue