diff options
author | fvogel <fvogelnew1@free.fr> | 2014-12-07 18:53:20 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2014-12-07 18:53:20 (GMT) |
commit | cb44b3813858cefddb5b55926a86c26be7922e2f (patch) | |
tree | e8b0c35b5ea635f2b978bede0efbe2f353b0bddb /generic | |
parent | 4f44e222d905d125876edf9a5faf14792edc729f (diff) | |
parent | 413213429639fc1c08af355008a85479b5d38739 (diff) | |
download | tk-cb44b3813858cefddb5b55926a86c26be7922e2f.zip tk-cb44b3813858cefddb5b55926a86c26be7922e2f.tar.gz tk-cb44b3813858cefddb5b55926a86c26be7922e2f.tar.bz2 |
Merged from branch bug-7703f947aa
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkTextDisp.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index ae5cdb2..4715864 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -5287,6 +5287,18 @@ MeasureUp( distance -= dlPtr->height; if (distance <= 0) { *dstPtr = dlPtr->index; + + /* + * Adjust index to the start of the display line. This is + * needed because the start of a logical line is not always + * the start of a display line (this is however true if the + * eol is not elided). + */ + + if (TkTextIsElided(textPtr, dstPtr, NULL)) { + TkTextFindDisplayLineEnd(textPtr, dstPtr, 0, + NULL); + } if (overlap != NULL) { *overlap = -distance; } @@ -5679,6 +5691,18 @@ YScrollByLines( offset++; if (offset == 0) { textPtr->topIndex = dlPtr->index; + + /* + * Adjust index to the start of the display line. This is + * needed because the start of a logical line is not + * always the start of a display line (this is however + * true if the eol is not elided). + */ + + if (TkTextIsElided(textPtr, &textPtr->topIndex, NULL)) { + TkTextFindDisplayLineEnd(textPtr, &textPtr->topIndex, 0, + NULL); + } break; } } |