summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2014-12-05 21:32:03 (GMT)
committerfvogel <fvogelnew1@free.fr>2014-12-05 21:32:03 (GMT)
commitd7801117c648ca4fd238563e9a37287fc6ba33d3 (patch)
treea2fc15e1e99ed48cfebc579562694e9871d97a2a
parentc3d0229cec20604126fb0074106c96fc3f082d02 (diff)
downloadtk-d7801117c648ca4fd238563e9a37287fc6ba33d3.zip
tk-d7801117c648ca4fd238563e9a37287fc6ba33d3.tar.gz
tk-d7801117c648ca4fd238563e9a37287fc6ba33d3.tar.bz2
indexPtr->byteIndex == 0 is the beginning of a display line only if indexPtr is not elided
-rw-r--r--generic/tkTextDisp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 851ee3e..dd4aa31 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -5033,7 +5033,8 @@ TkTextSetYView(
*/
textPtr->topIndex = *indexPtr;
- if (indexPtr->byteIndex != 0) {
+ if (!(indexPtr->byteIndex == 0
+ && !TkTextIsElided(textPtr, indexPtr, NULL))) {
TkTextFindDisplayLineEnd(textPtr, &textPtr->topIndex, 0, NULL);
}
dInfoPtr->newTopPixelOffset = pickPlace;