summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2014-12-06 14:29:36 (GMT)
committerfvogel <fvogelnew1@free.fr>2014-12-06 14:29:36 (GMT)
commit2143daab464ed81f9b1622f109a6f4c89d81aab2 (patch)
tree88fb8b4d8b534bdfbd4dbd1d01ccce7a00607ed5 /generic
parentad411a79cf977bbcf1cee08e6a85445fbfd30760 (diff)
downloadtk-2143daab464ed81f9b1622f109a6f4c89d81aab2.zip
tk-2143daab464ed81f9b1622f109a6f4c89d81aab2.tar.gz
tk-2143daab464ed81f9b1622f109a6f4c89d81aab2.tar.bz2
indexPtr->byteIndex == 0 is the beginning of a display line only if indexPtr is not elided. The start of a logical line is not always the start of a display line.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkTextDisp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 59efe04..ae5cdb2 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -6157,13 +6157,11 @@ 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) {
+ if ((dlPtr->index.byteIndex == 0)
+ && !TkTextIsElided(textPtr, &dlPtr->index, NULL)) {
return count;
}