summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r--generic/tkTextDisp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 1383c2a..c90f898 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -6287,6 +6287,7 @@ GetYPixelCount(
* index. */
{
TkTextLine *linePtr = dlPtr->index.linePtr;
+ TkTextIndex tmpIndex = dlPtr->index;
int count;
/*
@@ -6299,13 +6300,12 @@ GetYPixelCount(
/*
* For the common case where this dlPtr is also the start of the logical
- * line, we can return right away. Note the implicit assumption here that
- * the start of a logical line is always the start of a display line (if
- * the 'elide won't elide first newline' bug is fixed, this will no longer
- * necessarily be true).
+ * line, we can return right away.
*/
- if (dlPtr->index.byteIndex == 0) {
+ TkTextIndexBackBytes(textPtr, &tmpIndex, 1, &tmpIndex);
+ if ((dlPtr->index.byteIndex == 0)
+ && !TkTextIsElided(textPtr, &tmpIndex, NULL)) {
return count;
}