gitk: Fix a couple of bugs
First, if we invalidate the layout for all rows (i.e. from row 0 on), we were calling undolayout with an empty string as the argument. Second, the comparison in make_disporder that tests if we need to call update_arcrows was the wrong way around. Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras committed
Dec 11, 2007 at 20:09 UTC
0c27886e469dcf81ed0ba7b2035e32a823224edc
1 file changed
+3
-2
gitk
+3
-2
@@ -600,7 +600,8 @@ proc modify_arc {v a} {
600
while {$a != 0 && [lindex $varcrow($v) $a] eq {}} {
601
set a [lindex $vupptr($v) $a]
602
}
603
- undolayout [lindex $varcrow($v) $a]
603
+ set r [expr {$a == 0? 0: [lindex $varcrow($v) $a]}]
604
+ undolayout $r
605
}
606
}
607
@@ -739,7 +740,7 @@ proc make_disporder {start end} {
740
set la $varcmod($curview)
741
set lrow [lindex $varcrow($curview) $la]
742
if {$la == 0 || $lrow eq {} || \
742
- $end < $lrow + [llength $varccommits($curview,$la)]} {
743
+ $end > $lrow + [llength $varccommits($curview,$la)]} {
744
update_arcrows $curview
745
}
746
set ai [bsearch $vrownum($curview) $start]