From bd3a97c98ef8a1061e13b1a31779f90fbc013f8c Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 17 Nov 2004 22:18:28 +0000 Subject: * library/console.tcl (::tk::console::ExpandVariable): correct array keyname expansion. [Bug 1004508] (bold) --- library/console.tcl | 6 ++++-- 1 file 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*]] -- cgit v0.12