Skip to content

Commit

Permalink
gitk: Fix a couple of bugs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mackerras committed Dec 11, 2007
1 parent 9257d8f commit 0c27886
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,8 @@ proc modify_arc {v a} {
while {$a != 0 && [lindex $varcrow($v) $a] eq {}} {
set a [lindex $vupptr($v) $a]
}
undolayout [lindex $varcrow($v) $a]
set r [expr {$a == 0? 0: [lindex $varcrow($v) $a]}]
undolayout $r
}
}

Expand Down Expand Up @@ -739,7 +740,7 @@ proc make_disporder {start end} {
set la $varcmod($curview)
set lrow [lindex $varcrow($curview) $la]
if {$la == 0 || $lrow eq {} || \
$end < $lrow + [llength $varccommits($curview,$la)]} {
$end > $lrow + [llength $varccommits($curview,$la)]} {
update_arcrows $curview
}
set ai [bsearch $vrownum($curview) $start]
Expand Down

0 comments on commit 0c27886

Please sign in to comment.