diff options
author | Lukas <LukBukkit@users.noreply.github.com> | 2019-10-29 17:05:26 +0100 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-10-29 16:05:26 +0000 |
commit | 559803025df56b540137e3e3fff262433bee57af (patch) | |
tree | e822f69c8cfdbd8f48c71d6c19c12bd6ccf0704b /templates | |
parent | 9513a6983a9b0a025dc77ffdbc559f1550e3f7dd (diff) | |
download | gitea-559803025df56b540137e3e3fff262433bee57af.tar.gz gitea-559803025df56b540137e3e3fff262433bee57af.zip |
Show zero lines on the line counter if the file empty (#8700)
* Show zero lines on the line counter if the file empty
Signed-off-by: LukBukkit <luk.bukkit@gmail.com>
* A single variable to check whether NumLines is set
Signed-off-by: LukBukkit <luk.bukkit@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/view_file.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index e490fc123b..616ca25650 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -6,7 +6,7 @@ <strong>{{.FileName}}</strong> {{else}} <div class="file-info text grey normal mono"> - {{if .NumLines}} + {{if .NumLinesSet}} <div class="file-info-entry"> {{.NumLines}} {{.i18n.Tr (TrN .i18n.Lang .NumLines "repo.line" "repo.lines") }} </div> |