summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2014-12-05 23:41:01 (GMT)
committerfvogelnew1@free.fr <fvogel>2014-12-05 23:41:01 (GMT)
commit1e395b2665378f9aa4aef4188a646cadd63744c6 (patch)
tree3f444b0be74131016d6e2aeecaa5b9072dec74fa /generic
parentd58c3f52b8fbbc9f04ad583371bf2e5685fdd298 (diff)
parentc1617f4a09ebeb5b8d1f711b86377d6b6d8c3cff (diff)
downloadtk-1e395b2665378f9aa4aef4188a646cadd63744c6.zip
tk-1e395b2665378f9aa4aef4188a646cadd63744c6.tar.gz
tk-1e395b2665378f9aa4aef4188a646cadd63744c6.tar.bz2
Merged from branch bug-7703f947aa
Diffstat (limited to 'generic')
-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;
}