From 6300e6d87435fd2e2d9f27d8f5fdcd49342c9998 Mon Sep 17 00:00:00 2001 From: fvogel Date: Tue, 30 Dec 2014 17:57:17 +0000 Subject: A logical line is merged with its previous line if and only if the eol of the previous line is elided ([53f96d9a97] was not fully correct). --- generic/tkTextDisp.c | 10 +++++----- 1 file 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; } -- cgit v0.12