diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-01-26 13:40:47 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-01-26 13:40:47 (GMT) |
commit | 4700e9e59f18ee698abac1e482b1d12100a00df3 (patch) | |
tree | 9622c2c14ecfc5d73bd73577892a54c90dd69cba /library/word.tcl | |
parent | f50f3eca348c2e373a3e08e2a203bc9108f0fb29 (diff) | |
download | tcl-4700e9e59f18ee698abac1e482b1d12100a00df3.zip tcl-4700e9e59f18ee698abac1e482b1d12100a00df3.tar.gz tcl-4700e9e59f18ee698abac1e482b1d12100a00df3.tar.bz2 |
Fix [16e25e1402]: tcl_startOfPreviousWord cannot handle "end-1"
Diffstat (limited to 'library/word.tcl')
-rw-r--r-- | library/word.tcl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/word.tcl b/library/word.tcl index 0c8e01c..a993918 100644 --- a/library/word.tcl +++ b/library/word.tcl @@ -147,7 +147,7 @@ proc tcl_startOfPreviousWord {str start} { variable ::tcl::WordBreakRE set word {-1 -1} if {$start > 0} { - regexp -indices -- $WordBreakRE(previous) [string range $str 0 $start-1] \ + regexp -indices -- $WordBreakRE(previous) [string range [string range $str 0 $start] 0 end-1] \ result word } return [lindex $word 0] |