summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-10-06 22:50:36 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-10-06 22:50:36 (GMT)
commit687cdd2ef3948e5acf8a888de2578fa194958bcf (patch)
tree7fac782203379a735282c61dac8de3162c83261a
parent030aca39c08ef652e36870abdeee1bc2f2566e28 (diff)
downloadtk-687cdd2ef3948e5acf8a888de2578fa194958bcf.zip
tk-687cdd2ef3948e5acf8a888de2578fa194958bcf.tar.gz
tk-687cdd2ef3948e5acf8a888de2578fa194958bcf.tar.bz2
Fixed bug [2262711fff] - Regexp search fails with Unicode and elidebug_2262711fff
-rw-r--r--generic/tkText.c6
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;
}