diff options
author | ericm <ericm@noemail.net> | 2000-05-15 21:48:43 (GMT) |
---|---|---|
committer | ericm <ericm@noemail.net> | 2000-05-15 21:48:43 (GMT) |
commit | 369ab8fd4c0abeff7d1dce213273e20d36e6d69e (patch) | |
tree | e11ee3e0d14d20325b55725624bc4d598f30b18a /library | |
parent | 20daa96ae9e7518982898a2f0a72c565fadb6c33 (diff) | |
download | tcl-369ab8fd4c0abeff7d1dce213273e20d36e6d69e.zip tcl-369ab8fd4c0abeff7d1dce213273e20d36e6d69e.tar.gz tcl-369ab8fd4c0abeff7d1dce213273e20d36e6d69e.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: b47be28ecbb46ec40281f01c5d5a05a9436bc705
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..b93a083 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.4 2000/05/15 21:48:44 ericm 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; } |