summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkTextDisp.c4
-rw-r--r--tests/textDisp.test4
2 files changed, 6 insertions, 2 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index e318338..9d6a307 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -3383,8 +3383,10 @@ TkTextFindDisplayLineEnd(
* of the original index within its display
* line. */
{
+ TkTextIndex indexPtr2;
+ TkTextIndexBackBytes(textPtr, indexPtr, 1, &indexPtr2);
if (!end && indexPtr->byteIndex == 0
- && !TkTextIsElided(textPtr, indexPtr, NULL)) {
+ && !TkTextIsElided(textPtr, &indexPtr2, NULL)) {
/*
* Nothing to do.
*/
diff --git a/tests/textDisp.test b/tests/textDisp.test
index ea2100c..cab0ff6 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -2089,7 +2089,9 @@ test textDisp-16.41 {text count -xpixels with indices in elided lines} {
[.t count -xpixels 15.0 20.15] \
[.t count -xpixels 20.15 20.16] \
[.t count -xpixels 20.16 20.15]
-} [list 0 0 0 0 0 0 0 0 $fixedWidth -$fixedWidth]
+ .t tag remove hidden 20.0 20.15
+ lappend res [expr {[.t count -xpixels 5.0 20.0] != 0}]
+} [list 0 0 0 0 0 0 0 0 $fixedWidth -$fixedWidth 1]
test textDisp-16.42 {TkTextYviewCmd procedure with indices in elided lines} {
.t configure -wrap none
.t delete 1.0 end