Tk Library Source Code

Artifact [d18208d42a]
Login

Artifact d18208d42aa62c35f3bc36086527f021ceb5170d:

Attachment "swaplist-0.2.patch" to ticket [1886577fff] added by exgerhardr 2008-02-05 04:20:12.
--- swaplist.tcl.orig	2008-02-04 21:24:45.348797904 +0100
+++ swaplist.tcl	2008-02-04 21:44:49.340763304 +0100
@@ -10,7 +10,7 @@
 # RCS: @(#) $Id: swaplist.tcl,v 1.5 2005/08/25 03:36:58 andreas_kupries Exp $
 
 package require Tk
-package provide swaplist 0.1
+package provide swaplist 0.2
 
 namespace eval swaplist {
     namespace export swaplist
@@ -272,7 +272,9 @@
     if {[set cur [$from curselection]] == ""} { return }
     foreach x $cur {
         set name [$from get $x]
-        $to insert [FindPos $olist [$to get 0 end] $name] $name
+        set pos [FindPos $olist [$to get 0 end] $name]
+        $to insert $pos $name
+        lappend new $pos
     }
     foreach x [lreverse $cur] { $from delete $x }
     if {[$from index end] == 0} {