Artifact
dd84543f7f9b2efd5fddae8f48066f279f594ac3:
Attachment "listbox.patch" to
ticket [653266ffff]
added by
ndwinton
2002-12-13 21:30:23.
*** listbox.tcl.CVS Fri Dec 13 14:17:33 2002
--- listbox.tcl Fri Dec 13 14:14:57 2002
***************
*** 1356,1377 ****
s {
eval $path selection remove $data(sel_anchor)
! if { $idx > $data(anchor) } {
! set istart $data(anchor)
! set iend $idx
! } else {
! set istart $idx
! set iend $data(anchor)
! }
! for { set i $istart } { $i <= $iend } { incr i } {
! set l [$path selection get]
! set li [lsearch -exact $l $i]
if { $li < 0 } {
! $path selection add $i
! lappend data(sel_anchor) $i
! }
! }
}
}
}
--- 1356,1380 ----
s {
eval $path selection remove $data(sel_anchor)
! set ix [$path index $idx]
! set ia [$path index $data(anchor)]
! if { $ix > $ia } {
! set istart $ia
! set iend $ix
! } else {
! set istart $ix
! set iend $ia
! }
! for { set i $istart } { $i <= $iend } { incr i } {
! set l [$path selection get]
! set t [$path items $i]
! set li [lsearch -exact $l $t]
if { $li < 0 } {
! $path selection add $t
! lappend data(sel_anchor) $t
! }
! }
}
}
}