From a2f1887b92d002834dcbfd5685a51a1f53fd9824 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 9 May 2013 01:38:14 +0800 Subject: Bug 685645: make it clearer in splinter that a hunk's section/function header is not a removal --- extensions/Splinter/web/splinter.css | 6 +++++- extensions/Splinter/web/splinter.js | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/extensions/Splinter/web/splinter.css b/extensions/Splinter/web/splinter.css index 9f994eac9..e43dff8fa 100644 --- a/extensions/Splinter/web/splinter.css +++ b/extensions/Splinter/web/splinter.css @@ -240,10 +240,14 @@ div.review-patch-comment-text { font-style: italic; } +.hunk-header { + border: 1px solid #aaaaaa; +} + .hunk-header td { background: #ddccbb; - font-family: "DejaVu Sans Mono", monospace; font-size: 80%; + font-weight: bold; } .hunk-cell { diff --git a/extensions/Splinter/web/splinter.js b/extensions/Splinter/web/splinter.js index 8902a3d74..368bd74dc 100644 --- a/extensions/Splinter/web/splinter.js +++ b/extensions/Splinter/web/splinter.js @@ -2020,7 +2020,13 @@ Splinter.addPatchFile = function (file) { var hunkHeader = Splinter.EL("tr", "hunk-header"); tbody.appendChild(hunkHeader); hunkHeader.appendChild(Splinter.EL("td")); // line number column - var hunkCell = Splinter.EL("td", "hunk-cell", hunk.functionLine ? hunk.functionLine : "\u00a0"); + var hunkCell = Splinter.EL( + "td", + "hunk-cell", + "Lines " + hunk.oldStart + '-' + + Math.max(hunk.oldStart + hunk.oldCount - 1, hunk.newStart + hunk.newCount - 1) + + "\u00a0\u00a0" + hunk.functionLine + ); hunkCell.colSpan = file.status == Splinter.Patch.CHANGED ? 4 : 1; hunkHeader.appendChild(hunkCell); } -- cgit v1.2.3-24-g4f1b