summaryrefslogtreecommitdiffstats
path: root/generic/tkTextIndex.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkTextIndex.c')
-rw-r--r--generic/tkTextIndex.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index f64a6d2..b794cdb 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -2298,13 +2298,9 @@ StartEnd(
int chSize = 1;
if (segPtr->typePtr == &tkTextCharType) {
-#if TCL_UTF_MAX == 4
int ch;
- chSize = TkUtfToUniChar32(segPtr->body.chars + offset, &ch);
-#else
- Tcl_UniChar ch;
- chSize = Tcl_UtfToUniChar(segPtr->body.chars + offset, &ch);
-#endif
+
+ chSize = TkUtfToUniChar2(segPtr->body.chars + offset, &ch);
if (!Tcl_UniCharIsWordChar(ch)) {
break;
}
@@ -2347,13 +2343,9 @@ StartEnd(
int chSize = 1;
if (segPtr->typePtr == &tkTextCharType) {
-#if TCL_UTF_MAX == 4
+
int ch;
- TkUtfToUniChar32(segPtr->body.chars + offset, &ch);
-#else
- Tcl_UniChar ch;
- Tcl_UtfToUniChar(segPtr->body.chars + offset, &ch);
-#endif
+ TkUtfToUniChar2(segPtr->body.chars + offset, &ch);
if (!Tcl_UniCharIsWordChar(ch)) {
break;
}