mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
fix: can not select the last line in blame (#523)
This commit is contained in:
parent
19e930ef40
commit
4d6ecd2396
1 changed files with 4 additions and 4 deletions
|
@ -158,7 +158,7 @@ namespace SourceGit.Views
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var lineNumber = line.FirstDocumentLine.LineNumber;
|
var lineNumber = line.FirstDocumentLine.LineNumber;
|
||||||
if (lineNumber >= _editor.BlameData.LineInfos.Count)
|
if (lineNumber > _editor.BlameData.LineInfos.Count)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
var info = _editor.BlameData.LineInfos[lineNumber - 1];
|
var info = _editor.BlameData.LineInfos[lineNumber - 1];
|
||||||
|
@ -199,7 +199,7 @@ namespace SourceGit.Views
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var lineNumber = line.FirstDocumentLine.LineNumber;
|
var lineNumber = line.FirstDocumentLine.LineNumber;
|
||||||
if (lineNumber >= _editor.BlameData.LineInfos.Count)
|
if (lineNumber > _editor.BlameData.LineInfos.Count)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
var info = _editor.BlameData.LineInfos[lineNumber - 1];
|
var info = _editor.BlameData.LineInfos[lineNumber - 1];
|
||||||
|
@ -303,7 +303,7 @@ namespace SourceGit.Views
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var lineNumber = line.FirstDocumentLine.LineNumber;
|
var lineNumber = line.FirstDocumentLine.LineNumber;
|
||||||
if (lineNumber >= BlameData.LineInfos.Count)
|
if (lineNumber > BlameData.LineInfos.Count)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
var info = BlameData.LineInfos[lineNumber - 1];
|
var info = BlameData.LineInfos[lineNumber - 1];
|
||||||
|
@ -362,7 +362,7 @@ namespace SourceGit.Views
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var caret = TextArea.Caret;
|
var caret = TextArea.Caret;
|
||||||
if (caret == null || caret.Line >= BlameData.LineInfos.Count)
|
if (caret == null || caret.Line > BlameData.LineInfos.Count)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_highlight = BlameData.LineInfos[caret.Line - 1].CommitSHA;
|
_highlight = BlameData.LineInfos[caret.Line - 1].CommitSHA;
|
||||||
|
|
Loading…
Reference in a new issue