summaryrefslogtreecommitdiffstats
path: root/generic/tkText.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-10-09 19:28:10 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-10-09 19:28:10 (GMT)
commit4d2b0d587fba77e10b06b3353f3c4a07eabde390 (patch)
tree05391ab62b76a2bd1fc3c2912a5f319b2564fdda /generic/tkText.c
parent1ae4153f65c8bb705a1216a65bc06ab63b3458e6 (diff)
parentbefbed0e52d43e9fe81b8b577dd2dcf7ee01af03 (diff)
downloadtk-4d2b0d587fba77e10b06b3353f3c4a07eabde390.zip
tk-4d2b0d587fba77e10b06b3353f3c4a07eabde390.tar.gz
tk-4d2b0d587fba77e10b06b3353f3c4a07eabde390.tar.bz2
Fixed bug [2262711fff] - Regexp search fails with Unicode and elide
Diffstat (limited to 'generic/tkText.c')
-rw-r--r--generic/tkText.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index d93d8fc..b002068 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -4234,7 +4234,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;
}