summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-06-01 04:08:58 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-06-06 05:26:43 (GMT)
commitbea39c2ddb01af2908a5932231fde02b52a262d7 (patch)
tree01c2a1fc5869d0cdae138097dfa4bfab653affb3
parentd89a494fcae246b696a2fe234ccf166669a3a45e (diff)
downloadgit-bea39c2ddb01af2908a5932231fde02b52a262d7.zip
git-bea39c2ddb01af2908a5932231fde02b52a262d7.tar.gz
git-bea39c2ddb01af2908a5932231fde02b52a262d7.tar.bz2
git-gui: Remove empty blank line at end of blame
The blame viewer has this silly blank line at the bottom of it; we really don't want to see it displayed as we will never get any blame data for that line (it doesn't exist in the source). Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--lib/blame.tcl13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/blame.tcl b/lib/blame.tcl
index 2d0c3f2..a6f0b4a 100644
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
@@ -203,10 +203,15 @@ method _read_file {fd} {
regsub "\r\$" $line {} line
incr total_lines
- $w_load insert end "\n"
- $w_cgrp insert end "\n"
- $w_line insert end "$total_lines\n" linenumber
- $w_file insert end "$line\n"
+ if {$total_lines > 1} {
+ $w_load insert end "\n"
+ $w_cgrp insert end "\n"
+ $w_line insert end "\n"
+ $w_file insert end "\n"
+ }
+
+ $w_line insert end "$total_lines" linenumber
+ $w_file insert end "$line"
}
$w_load conf -state disabled
$w_cgrp conf -state disabled