summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2014-12-30 17:57:17 (GMT)
committerfvogelnew1@free.fr <fvogel>2014-12-30 17:57:17 (GMT)
commit0ce528a57ff7b62516670dedbba34ea057b5bc20 (patch)
tree9037873d1eca9b6389a8fbc140e1bff7fb85dd04
parent39832d1d8fa18632e007325d700536518d296946 (diff)
downloadtk-0ce528a57ff7b62516670dedbba34ea057b5bc20.zip
tk-0ce528a57ff7b62516670dedbba34ea057b5bc20.tar.gz
tk-0ce528a57ff7b62516670dedbba34ea057b5bc20.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).
-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;
}