summaryrefslogtreecommitdiffstats
path: root/library/console.tcl
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-11-17 22:18:28 (GMT)
committerhobbs <hobbs>2004-11-17 22:18:28 (GMT)
commit82926d13ee257a1cce4a18256043ba23a34f0a1b (patch)
treeefcd8c45873d32c89aea8d0891a33a1947951ff5 /library/console.tcl
parent0c0798b6eab4fd082981f614b8103c3109a3d4a3 (diff)
downloadtk-82926d13ee257a1cce4a18256043ba23a34f0a1b.zip
tk-82926d13ee257a1cce4a18256043ba23a34f0a1b.tar.gz
tk-82926d13ee257a1cce4a18256043ba23a34f0a1b.tar.bz2
* library/console.tcl (::tk::console::ExpandVariable): correct
array keyname expansion. [Bug 1004508] (bold)
Diffstat (limited to 'library/console.tcl')
-rw-r--r--library/console.tcl6
1 files changed, 4 insertions, 2 deletions
diff --git a/library/console.tcl b/library/console.tcl
index 93f4f30..a4fcbbc 100644
--- a/library/console.tcl
+++ b/library/console.tcl
@@ -4,7 +4,7 @@
# can be used by non-unix systems that do not have built-in support
# for shells.
#
-# RCS: @(#) $Id: console.tcl,v 1.22 2003/02/21 03:34:29 das Exp $
+# RCS: @(#) $Id: console.tcl,v 1.22.2.1 2004/11/17 22:18:28 hobbs Exp $
#
# Copyright (c) 1995-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
@@ -896,7 +896,9 @@ proc ::tk::console::ExpandVariable str {
set vars $ary\([ExpandBestMatch $match $str]
foreach var $match {lappend vars $ary\($var\)}
return $vars
- } else {set match $ary\($match\)}
+ } elseif {[llength $match] == 1} {
+ set match $ary\($match\)
+ }
## Space transformation avoided for array names.
} else {
set match [EvalAttached [list info vars $str*]]