diff options
author | fvogel <fvogelnew1@free.fr> | 2015-01-24 14:58:03 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2015-01-24 14:58:03 (GMT) |
commit | 662480c9ebe208020fd0484bbd7908dbb0fa7562 (patch) | |
tree | f38ea602db1991d6f158b487369145dfa7ac873f /generic/tkText.h | |
parent | 2a1df1da7fd04bf2163249f588314d1ae33d12f5 (diff) | |
download | tk-662480c9ebe208020fd0484bbd7908dbb0fa7562.zip tk-662480c9ebe208020fd0484bbd7908dbb0fa7562.tar.gz tk-662480c9ebe208020fd0484bbd7908dbb0fa7562.tar.bz2 |
TkTextIndexCount is counting chars. Fix these calls where bytes counting is needed. Among other issues, this fixes horizontal scrolling when typing text at the end of a line containing multi-byte characters.
Diffstat (limited to 'generic/tkText.h')
-rw-r--r-- | generic/tkText.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tkText.h b/generic/tkText.h index 4ffdc8a..6f5f153 100644 --- a/generic/tkText.h +++ b/generic/tkText.h @@ -1071,6 +1071,9 @@ MODULE_SCOPE void TkTextIndexBackChars(const TkText *textPtr, TkTextIndex *dstPtr, TkTextCountType type); MODULE_SCOPE int TkTextIndexCmp(const TkTextIndex *index1Ptr, const TkTextIndex *index2Ptr); +MODULE_SCOPE int TkTextIndexCountBytes(const TkText *textPtr, + const TkTextIndex *index1Ptr, + const TkTextIndex *index2Ptr); MODULE_SCOPE int TkTextIndexCount(const TkText *textPtr, const TkTextIndex *index1Ptr, const TkTextIndex *index2Ptr, |