From 5ef7fdbd54ef41de01b64b4df58529d4bf3c62a3 Mon Sep 17 00:00:00 2001 From: George Dewar Date: Thu, 17 Apr 2014 14:36:43 +1200 Subject: Fix bug in which a line count without empty lines was incorrectly used --- app/helpers/commits_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index c6e4f574b67..b02be4623fd 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -116,7 +116,7 @@ module CommitsHelper added_lines[line_new] = { line_code: line_code, type: type, line: line } end end - max_length = old_file ? old_file.sloc + added_lines.length : file.sloc + max_length = old_file ? [old_file.loc, file.loc].max : file.loc offset1 = 0 offset2 = 0 -- cgit v1.2.3