summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2014-12-05 20:33:13 (GMT)
committerfvogelnew1@free.fr <fvogel>2014-12-05 20:33:13 (GMT)
commit3f037b375807f9780183c7ce635bffdd313bd98d (patch)
treee31b756f58e558dfe0d5272dc256b85b24ade6e8 /generic
parentd3e4744b3c4c9b1b1a5f41831994df026020e737 (diff)
downloadtk-3f037b375807f9780183c7ce635bffdd313bd98d.zip
tk-3f037b375807f9780183c7ce635bffdd313bd98d.tar.gz
tk-3f037b375807f9780183c7ce635bffdd313bd98d.tar.bz2
Fixed text count -xpixels with indices in elided lines
Diffstat (limited to 'generic')
-rw-r--r--generic/tkTextDisp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 3d442af..851ee3e 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -3382,7 +3382,8 @@ TkTextFindDisplayLineEnd(
* of the original index within its display
* line. */
{
- if (!end && indexPtr->byteIndex == 0) {
+ if (!end && indexPtr->byteIndex == 0
+ && !TkTextIsElided(textPtr, indexPtr, NULL)) {
/*
* Nothing to do.
*/
@@ -3461,8 +3462,9 @@ TkTextFindDisplayLineEnd(
* this now.
*/
- *xOffset = DlineXOfIndex(textPtr, dlPtr,
- indexPtr->byteIndex - dlPtr->index.byteIndex);
+ *xOffset = DlineXOfIndex(textPtr, dlPtr,
+ TkTextIndexCount(textPtr, &dlPtr->index, indexPtr,
+ COUNT_INDICES));
}
if (end) {
/*