diff options
author | Gjergji Ramku <Gjergj@users.noreply.github.com> | 2020-08-20 16:53:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-20 09:53:06 -0500 |
commit | 0c9eb468e9a55f933286a45f366f41a7a4e79637 (patch) | |
tree | 590efa801dddbbaa22638a7c649178ca5714921a /services/gitdiff | |
parent | d15bb17b78f8aee3285b5fadf924ac2dc569f790 (diff) | |
download | gitea-0c9eb468e9a55f933286a45f366f41a7a4e79637.tar.gz gitea-0c9eb468e9a55f933286a45f366f41a7a4e79637.zip |
Fix typos (#12542)
Signed-off-by: Gjergji Ramku <gjergjiramku@gmail.com>
Diffstat (limited to 'services/gitdiff')
-rw-r--r-- | services/gitdiff/gitdiff.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/gitdiff/gitdiff.go b/services/gitdiff/gitdiff.go index d50ae6ae27..fd07a2ad96 100644 --- a/services/gitdiff/gitdiff.go +++ b/services/gitdiff/gitdiff.go @@ -89,8 +89,8 @@ type DiffLineSectionInfo struct { RightHunkSize int } -// BlobExceprtChunkSize represent max lines of excerpt -const BlobExceprtChunkSize = 20 +// BlobExcerptChunkSize represent max lines of excerpt +const BlobExcerptChunkSize = 20 // GetType returns the type of a DiffLine. func (d *DiffLine) GetType() int { @@ -139,7 +139,7 @@ func (d *DiffLine) GetExpandDirection() DiffLineExpandDirection { } if d.SectionInfo.LastLeftIdx <= 0 && d.SectionInfo.LastRightIdx <= 0 { return DiffLineExpandUp - } else if d.SectionInfo.RightIdx-d.SectionInfo.LastRightIdx > BlobExceprtChunkSize && d.SectionInfo.RightHunkSize > 0 { + } else if d.SectionInfo.RightIdx-d.SectionInfo.LastRightIdx > BlobExcerptChunkSize && d.SectionInfo.RightHunkSize > 0 { return DiffLineExpandUpDown } else if d.SectionInfo.LeftHunkSize <= 0 && d.SectionInfo.RightHunkSize <= 0 { return DiffLineExpandDown |