diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkText.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/tkText.c b/generic/tkText.c index f023509..cb89218 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -4196,7 +4196,11 @@ TextSearchFoundMatch( matchOffset += Tcl_NumUtfChars(segPtr->body.chars, -1); } } else { - leftToScan -= segPtr->size; + if (searchSpecPtr->exact) { + leftToScan -= segPtr->size; + } else { + leftToScan -= Tcl_NumUtfChars(segPtr->body.chars, -1); + } } curIndex.byteIndex += segPtr->size; } |