diff options
author | fvogel <fvogelnew1@free.fr> | 2014-12-05 23:39:32 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2014-12-05 23:39:32 (GMT) |
commit | 3911096b07e236df99e42d0a2002a439163e0a20 (patch) | |
tree | a5ae93fa548f7080731d087e78025bfaee9c817f /generic/tkTextDisp.c | |
parent | dd3a3ee0e1986dacd24474e62f1a63a002362c4e (diff) | |
download | tk-3911096b07e236df99e42d0a2002a439163e0a20.zip tk-3911096b07e236df99e42d0a2002a439163e0a20.tar.gz tk-3911096b07e236df99e42d0a2002a439163e0a20.tar.bz2 |
Fixed text count -ypixels with indices in elided lines
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r-- | generic/tkTextDisp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index 851ee3e..8281411 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -3601,15 +3601,18 @@ TkTextIndexYPixels( int pixelHeight; TkTextIndex index; - pixelHeight = TkBTreePixelsTo(textPtr, indexPtr->linePtr); + index = *indexPtr; + TkTextFindDisplayLineEnd(textPtr, &index, 0, NULL); + + pixelHeight = TkBTreePixelsTo(textPtr, index.linePtr); /* * Iterate through all display-lines corresponding to the single logical - * line belonging to indexPtr, adding up the pixel height of each such + * line belonging to index, adding up the pixel height of each such * display line as we go along, until we go past 'indexPtr'. */ - if (indexPtr->byteIndex == 0) { + if (index.byteIndex == 0) { return pixelHeight; } |