From 81984ff8d6b54b07cf1653b70780b664c528708d Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 13 Feb 2004 13:41:07 +0000 Subject: Protected UTF8 patch for correct compilation under Perl/Tk 800 --- generic/Text.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'generic/Text.c') diff --git a/generic/Text.c b/generic/Text.c index c81d1b7..891ab85 100644 --- a/generic/Text.c +++ b/generic/Text.c @@ -1557,7 +1557,11 @@ PointToChar(TextItem text, n = Tk_MeasureChars(text->font, ti->start, (int) ti->num_bytes, p.x + 2 - (int) ti->origin_x, TK_PARTIAL_OK, &dummy); +#ifdef PTK + byte_index = (ti->start + n - 1) - text->text; +#else byte_index = Tcl_UtfPrev(ti->start + n, ti->start) - text->text; +#endif break; } } -- cgit v1.1