summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2014-12-30 17:57:17 (GMT)
committerfvogel <fvogelnew1@free.fr>2014-12-30 17:57:17 (GMT)
commit6300e6d87435fd2e2d9f27d8f5fdcd49342c9998 (patch)
tree355bffd338d4b8c4d0a94280e258878011745404 /generic/tkTextDisp.c
parenta1cbc94e3bc9c2bf506d465c1444787701ed5970 (diff)
downloadtk-6300e6d87435fd2e2d9f27d8f5fdcd49342c9998.zip
tk-6300e6d87435fd2e2d9f27d8f5fdcd49342c9998.tar.gz
tk-6300e6d87435fd2e2d9f27d8f5fdcd49342c9998.tar.bz2
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).
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;
}