summaryrefslogtreecommitdiffstats
path: root/generic
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)
commitc8ef3ad137f087f47f0d4a35079eb94314f73f4b (patch)
tree355bffd338d4b8c4d0a94280e258878011745404 /generic
parent58730bbafbd80704a0fa7d9edda21133025671cb (diff)
downloadtk-c8ef3ad137f087f47f0d4a35079eb94314f73f4b.zip
tk-c8ef3ad137f087f47f0d4a35079eb94314f73f4b.tar.gz
tk-c8ef3ad137f087f47f0d4a35079eb94314f73f4b.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')
-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;
}