summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2014-12-05 23:41:01 (GMT)
committerfvogel <fvogelnew1@free.fr>2014-12-05 23:41:01 (GMT)
commitdab416f0125f395a68d68a2001097524b56405a8 (patch)
tree456cfcca92eae3584bf8c84880db0392f618beba /generic/tkTextDisp.c
parent70aa470687dbcd6cb2eb984e6a88aa00c450e4f8 (diff)
parent3911096b07e236df99e42d0a2002a439163e0a20 (diff)
downloadtk-dab416f0125f395a68d68a2001097524b56405a8.zip
tk-dab416f0125f395a68d68a2001097524b56405a8.tar.gz
tk-dab416f0125f395a68d68a2001097524b56405a8.tar.bz2
Merged from branch bug-7703f947aa
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r--generic/tkTextDisp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index dd4aa31..538c59d 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;
}