global idinlist rowchk rowrangelist
set idlist [lindex $rowidlist $row]
- set offs [lindex $rowoffsets $row]
while {$row < $endrow} {
set id [lindex $displayorder $row]
- set oldolds {}
- set newolds {}
- set olds [lindex $parentlist $row]
- foreach p $olds {
- if {![info exists idinlist($p)]} {
- lappend newolds $p
- } elseif {!$idinlist($p)} {
- lappend oldolds $p
- set nev [expr {[llength $idlist] - $maxwidth + 1}]
- foreach p [lindex $parentlist $row] {
- if {![info exists idinlist($p)] || !$idinlist($p)} {
- incr nev
-- }
- set idinlist($p) 1
-- }
- set nev [expr {[llength $idlist] + [llength $newolds]
- + [llength $oldolds] - $maxwidth + 1}]
- if {1 || $nev > 0} {
- if {$nev > 0} {
++ if {1} {
if {!$last &&
$row + $uparrowlen + $mingaplen >= $commitidx($curview)} break
for {set x [llength $idlist]} {[incr x -1] >= 0} {} {
set idinlist($i) 0
set rm1 [expr {$row - 1}]
lappend idrowranges($i) [lindex $displayorder $rm1]
- #if {[incr nev -1] <= 0} break
- if {[incr nev -1] <= 0} break
continue
}
- set rowchk($id) [expr {$row + $r}]
+ set rowchk($i) [expr {$row + $r}]
}
}
lset rowidlist $row $idlist
- lset rowoffsets $row $offs
}
+ set oldolds {}
+ set newolds {}
+ foreach p [lindex $parentlist $row] {
+ if {![info exists idinlist($p)]} {
+ lappend newolds $p
+ } elseif {!$idinlist($p)} {
+ lappend oldolds $p
+ }
+ set idinlist($p) 1
+ }
set col [lsearch -exact $idlist $id]
if {$col < 0} {
- set col [llength $idlist]
- lappend idlist $id
+ set col [idcol $idlist $id]
+ set idlist [linsert $idlist $col $id]
lset rowidlist $row $idlist
- set z {}
if {$children($curview,$id) ne {}} {
- set z [expr {[llength [lindex $rowidlist [expr {$row-1}]]] - $col}]
unset idinlist($id)
- }
- lappend offs $z
- lset rowoffsets $row $offs
- if {$z ne {}} {
- makeuparrow $id $col $row $z
+ makeuparrow $id $row $col
}
} else {
unset idinlist($id)