From 9be3e766082bd89b18ca17b939bbfe66a62f72bc Mon Sep 17 00:00:00 2001 From: ericm Date: Mon, 15 May 2000 21:48:44 +0000 Subject: * 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]. --- ChangeLog | 13 +++++++++++++ library/history.tcl | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0bd6ca5..41d370c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-05-15 Eric Melski + + * 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]. + 2000-05-10 Jeff Hobbs * generic/tclPosixStr.c (Tcl_SignalMsg): clarified #defines for @@ -22,6 +28,13 @@ * win/tclWinThrd.c (TclpInitLock, TclpMasterLock): Added missing initialization of joinLock. +2000-05-09 Eric Melski + + * tests/lsearch.test: + * doc/lsearch.n: + * generic/tclCmdIL.c (Tcl_LsearchObjCmd): Extended [lsearch] to + support sorted list searching and typed list searching. [RFE: 4098]. + 2000-05-08 Jeff Hobbs * doc/expr.n: 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; } -- cgit v0.12