summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;