From 616f8e79872ffbec55d54a3dd50a5e7c12df531e Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Tue, 2 Mar 2021 16:29:37 +0000 Subject: Updated Tcl/Tk git-svn-id: svn://tug.org/texlive/trunk@58056 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/tltcl/lib/tcl8.6/word.tcl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Master/tlpkg/tltcl/lib/tcl8.6/word.tcl') diff --git a/Master/tlpkg/tltcl/lib/tcl8.6/word.tcl b/Master/tlpkg/tltcl/lib/tcl8.6/word.tcl index 3e4bc3ac2a5..828f13ab348 100644 --- a/Master/tlpkg/tltcl/lib/tcl8.6/word.tcl +++ b/Master/tlpkg/tltcl/lib/tcl8.6/word.tcl @@ -4,8 +4,8 @@ # strings. This file is primarily needed so Tk text and entry widgets behave # properly for different platforms. # -# Copyright (c) 1996 by Sun Microsystems, Inc. -# Copyright (c) 1998 by Scritpics Corporation. +# Copyright (c) 1996 Sun Microsystems, Inc. +# Copyright (c) 1998 Scritpics Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -146,7 +146,9 @@ proc tcl_startOfNextWord {str start} { proc tcl_startOfPreviousWord {str start} { variable ::tcl::WordBreakRE set word {-1 -1} - regexp -indices -- $WordBreakRE(previous) [string range $str 0 $start-1] \ - result word + if {$start > 0} { + regexp -indices -- $WordBreakRE(previous) [string range $str 0 $start-1] \ + result word + } return [lindex $word 0] } -- cgit v1.2.3