diff options
author | fvogelnew1@free.fr <fvogel> | 2014-12-05 20:33:13 (GMT) |
---|---|---|
committer | fvogelnew1@free.fr <fvogel> | 2014-12-05 20:33:13 (GMT) |
commit | 0042a0ad529425168e39b59925371db0b4e835d8 (patch) | |
tree | b5b6fddbbdec22df9a26ce8202194e1bc7dd8e51 /generic | |
parent | f1a5d193fa67fd43fb194976464d1de370dc0867 (diff) | |
download | tk-0042a0ad529425168e39b59925371db0b4e835d8.zip tk-0042a0ad529425168e39b59925371db0b4e835d8.tar.gz tk-0042a0ad529425168e39b59925371db0b4e835d8.tar.bz2 |
Fixed text count -xpixels with indices in elided lines
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkTextDisp.c | 8 |
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) { /* |