diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2021-03-02 16:29:37 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2021-03-02 16:29:37 +0000 |
commit | 616f8e79872ffbec55d54a3dd50a5e7c12df531e (patch) | |
tree | a161afe04b7f6fe85d431035954f953ebbfafc04 /Master/tlpkg/tltcl/lib/tcl8.6/word.tcl | |
parent | 9f5b17da86ecb1e3dc760d0cf781062ba16460a7 (diff) |
Updated Tcl/Tk
git-svn-id: svn://tug.org/texlive/trunk@58056 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tltcl/lib/tcl8.6/word.tcl')
-rw-r--r-- | Master/tlpkg/tltcl/lib/tcl8.6/word.tcl | 10 |
1 files changed, 6 insertions, 4 deletions
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] } |