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>
Shawn O. Pearce committed
Jun 1, 2007 at 00:08 UTC
bea39c2ddb01af2908a5932231fde02b52a262d7
1 file changed
+9
-4
lib/blame.tcl
+9
-4
@@ -203,10 +203,15 @@ method _read_file {fd} {
203
regsub "\r\$" $line {} line
204
incr total_lines
205
206
- $w_load insert end "\n"
207
- $w_cgrp insert end "\n"
208
- $w_line insert end "$total_lines\n" linenumber
209
- $w_file insert end "$line\n"
206
+ if {$total_lines > 1} {
207
+ $w_load insert end "\n"
208
+ $w_cgrp insert end "\n"
209
+ $w_line insert end "\n"
210
+ $w_file insert end "\n"
211
+ }
212
+
213
+ $w_line insert end "$total_lines" linenumber
214
+ $w_file insert end "$line"
215
}
216
$w_load conf -state disabled
217
$w_cgrp conf -state disabled