summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2006-04-10 21:33:44 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2006-04-10 21:33:44 (GMT)
commit5b591cde8c1f5dab94c620646416e88e2d04a6dd (patch)
tree1fa5db8dd07305494ca6a7b46ade459431dc66ab /library
parent272fe823fe3b1e0e048c8b7363b3992a909cbdc3 (diff)
downloadtk-5b591cde8c1f5dab94c620646416e88e2d04a6dd.zip
tk-5b591cde8c1f5dab94c620646416e88e2d04a6dd.tar.gz
tk-5b591cde8c1f5dab94c620646416e88e2d04a6dd.tar.bz2
Fix [1467938]
Diffstat (limited to 'library')
-rw-r--r--library/tkfbox.tcl16
1 files changed, 10 insertions, 6 deletions
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index 73efa58..07e214b 100644
--- a/library/tkfbox.tcl
+++ b/library/tkfbox.tcl
@@ -11,7 +11,7 @@
# files by clicking on the file icons or by entering a filename
# in the "Filename:" entry.
#
-# RCS: @(#) $Id: tkfbox.tcl,v 1.56 2006/03/17 11:13:15 patthoyts Exp $
+# RCS: @(#) $Id: tkfbox.tcl,v 1.57 2006/04/10 21:33:45 dkf Exp $
#
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
#
@@ -737,18 +737,22 @@ proc ::tk::IconList_Goto {w text} {
return
}
- set text [string tolower $text]
+ if {[llength [IconList_CurSelection $w]]} {
+ set start [IconList_Index $w anchor]
+ } else {
+ set start 0
+ }
+
set theIndex -1
set less 0
set len [string length $text]
set len0 [expr {$len-1}]
set i $start
- # Search forward until we find a filename whose prefix is an exact match
- # with $text
+ # Search forward until we find a filename whose prefix is a
+ # case-insensitive match with $text
while {1} {
- set sub [string range $textList($i) 0 $len0]
- if {$text eq $sub} {
+ if {[string equal -nocase -length $len0 $textList($i) $text]} {
set theIndex $i
break
}