gitk: Fix bug causing "can't read commitrow(0,n)" error
In commit 66e46f37de3ed3211a8ae0e8fc09c063bc3a1e08 I changed gitk to store ids in rowrangelist and idrowranges rather than row numbers, but I missed two places in the layouttail procedure. This resulted in occasional errors such as the "can't read "commitrow(0,8572)": no such element in array" error reported by Mark Levedahl. This fixes it by using the id rather than the row number. Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras committed
Jul 9, 2007 at 22:29 UTC
8c93917d23ec7ef998154a6b2ac91ed1a1bf5e3a
1 file changed
+2
-2
gitk
+2
-2
@@ -2885,7 +2885,7 @@ proc layouttail {} {
2885
set id [lindex $idlist $col]
2886
addextraid $id $row
2887
unset idinlist($id)
2888
- lappend idrowranges($id) $row
2888
+ lappend idrowranges($id) $id
2889
lappend rowrangelist $idrowranges($id)
2890
unset idrowranges($id)
2891
incr row
@@ -2901,7 +2901,7 @@ proc layouttail {} {
2901
lset rowidlist $row [list $id]
2902
lset rowoffsets $row 0
2903
makeuparrow $id 0 $row 0
2904
- lappend idrowranges($id) $row
2904
+ lappend idrowranges($id) $id
2905
lappend rowrangelist $idrowranges($id)
2906
unset idrowranges($id)
2907
incr row