From 48cf9edcf5652217e986445d83f9f29624e4f377 Mon Sep 17 00:00:00 2001
From: Unknwon
Date: Thu, 23 Feb 2017 13:24:59 -0500
Subject: [PATCH] templates/repo/diff: fix tag-code doesn't display in split
view
---
templates/repo/diff/box.tmpl | 31 +++++++++++++++---------
templates/repo/diff/section_unified.tmpl | 2 +-
2 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index 4f6c70a32..96fdc28b4 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -93,18 +93,25 @@
{{range $j, $section := $file.Sections}}
{{range $k, $line := $section.Lines}}
-
{{end}}
{{end}}
diff --git a/templates/repo/diff/section_unified.tmpl b/templates/repo/diff/section_unified.tmpl
index f5ea81f17..619f97cfc 100644
--- a/templates/repo/diff/section_unified.tmpl
+++ b/templates/repo/diff/section_unified.tmpl
@@ -19,7 +19,7 @@
{{end}}
{{end}}
-
- {{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}
-
-
-
-
- {{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
- {{if $line.RightIdx}}{{$line.RightIdx}}{{end}}
-
-
-
+ {{if eq .GetType 4}}
+
- {{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
+
+
+ {{else}}
+
+ {{$section.GetComputedInlineDiffFor $line}}
+ {{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}
+
+
+
+
+ {{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
+ {{if $line.RightIdx}}{{$line.RightIdx}}{{end}}
+
+
+
+ {{end}}
+ {{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
{{$section.GetComputedInlineDiffFor $line}}