From 73474c043bfdeeb33cd58bdfe42592fea3083422 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Sun, 3 Jan 2016 19:26:46 -0200 Subject: Highlighting differences of lines in the diff view. --- routers/repo/commit.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'routers/repo/commit.go') diff --git a/routers/repo/commit.go b/routers/repo/commit.go index c3fc4d17..9e46c2e8 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -168,6 +168,12 @@ func Diff(ctx *middleware.Context) { } } + for _, diffFile := range diff.Files { + for _, diffSection := range diffFile.Sections { + diffSection.ComputeLinesDiff() + } + } + ctx.Data["IsSplitStyle"] = ctx.Query("style") == "split" ctx.Data["Username"] = userName ctx.Data["Reponame"] = repoName -- cgit v1.2.3