Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
Jonas Franz 2018-05-31 16:46:40 +02:00 committed by Jonas Franz
parent c8c1e704ed
commit b6d8aea5bb
No known key found for this signature in database
GPG Key ID: 506AEEBE80BEDECD

View File

@ -409,7 +409,7 @@ func (c *Comment) AsDiff() (*Diff, error) {
break
}
}
if searchedLineIdx >= setting.UI.CodeCommentLines - 1 {
if searchedLineIdx >= setting.UI.CodeCommentLines-1 {
first := searchedLineIdx - setting.UI.CodeCommentLines + 1
last := searchedLineIdx + 1
sec.Lines = sec.Lines[first:last]