diff options
author | hobbs <hobbs@noemail.net> | 2000-08-07 21:31:46 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2000-08-07 21:31:46 (GMT) |
commit | 6432449b4be4386673046c8eb5795e03d546875e (patch) | |
tree | a60a3bcb76d669e4ec481a417411b7437971a7ee /library | |
parent | 767e70e996f68f94d4f883e0ab9f0357971e402e (diff) | |
download | tcl-6432449b4be4386673046c8eb5795e03d546875e.zip tcl-6432449b4be4386673046c8eb5795e03d546875e.tar.gz tcl-6432449b4be4386673046c8eb5795e03d546875e.tar.bz2 |
* library/history.tcl: Corrected an off-by-one error in HistIndex,
which was causing [history redo] to start its search at the wrong
event index. [Bug: 1269].
FossilOrigin-Name: 16ecf09ff855bd0815a26c08aef6bada55dcd04d
Diffstat (limited to 'library')
-rw-r--r-- | library/history.tcl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/library/history.tcl b/library/history.tcl index a3bfb85..5b18f2b 100644 --- a/library/history.tcl +++ b/library/history.tcl @@ -2,7 +2,7 @@ # # Implementation of the history command. # -# RCS: @(#) $Id: history.tcl,v 1.3 1998/09/14 18:40:03 stanton Exp $ +# RCS: @(#) $Id: history.tcl,v 1.3.18.1 2000/08/07 21:31:47 hobbs Exp $ # # Copyright (c) 1997 Sun Microsystems, Inc. # @@ -305,7 +305,8 @@ proc history {args} { proc tcl::HistIndex {event} { variable history if {[catch {expr {~$event}}]} { - for {set i $history(nextid)} {[info exists history($i)]} {incr i -1} { + for {set i [expr {$history(nextid)-1}]} {[info exists history($i)]} \ + {incr i -1} { if {[string match $event* $history($i)]} { return $i; } |