diff options
author | fvogelnew1@free.fr <fvogel> | 2014-12-05 23:39:32 (GMT) |
---|---|---|
committer | fvogelnew1@free.fr <fvogel> | 2014-12-05 23:39:32 (GMT) |
commit | c1617f4a09ebeb5b8d1f711b86377d6b6d8c3cff (patch) | |
tree | c571bd1f81164cc21bfcf3ada6de6a6f92ca91a6 /generic | |
parent | 0042a0ad529425168e39b59925371db0b4e835d8 (diff) | |
download | tk-c1617f4a09ebeb5b8d1f711b86377d6b6d8c3cff.zip tk-c1617f4a09ebeb5b8d1f711b86377d6b6d8c3cff.tar.gz tk-c1617f4a09ebeb5b8d1f711b86377d6b6d8c3cff.tar.bz2 |
Fixed text count -ypixels with indices in elided lines
Diffstat (limited to 'generic')
-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; } |