diff options
author | hobbs <hobbs> | 2004-11-17 22:18:28 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2004-11-17 22:18:28 (GMT) |
commit | bd3a97c98ef8a1061e13b1a31779f90fbc013f8c (patch) | |
tree | efcd8c45873d32c89aea8d0891a33a1947951ff5 | |
parent | bd3e4458f075425d0c023eafb0cd1fa07d3ed434 (diff) | |
download | tk-bd3a97c98ef8a1061e13b1a31779f90fbc013f8c.zip tk-bd3a97c98ef8a1061e13b1a31779f90fbc013f8c.tar.gz tk-bd3a97c98ef8a1061e13b1a31779f90fbc013f8c.tar.bz2 |
* library/console.tcl (::tk::console::ExpandVariable): correct
array keyname expansion. [Bug 1004508] (bold)
-rw-r--r-- | library/console.tcl | 6 |
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*]] |