File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ proc tcl_startOfPreviousWord {str start} {
147
147
variable ::tcl::WordBreakRE
148
148
set word {-1 -1}
149
149
if {$start > 0} {
150
- regexp -indices -- $WordBreakRE(previous) [ string range $str 0 $start -1] \
150
+ regexp -indices -- $WordBreakRE(previous) [ string range [ string range $str 0 $start ] 0 end -1] \
151
151
result word
152
152
}
153
153
return [lindex $word 0]
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ test word-2.6 {tcl_startOfPreviousWord} -body {
64
64
test word-2.7 {tcl_startOfPreviousWord} -body {
65
65
tcl_startOfPreviousWord "ab cd" end
66
66
} -result 3
67
- test word-2.8 {tcl_startOfPreviousWord, bug [16e25e1402]} -constraints knownBug - body {
67
+ test word-2.8 {tcl_startOfPreviousWord, bug [16e25e1402]} -body {
68
68
tcl_startOfPreviousWord "ab cd" end-1
69
69
} -result 0
70
70
You can’t perform that action at this time.
0 commit comments