diff options
author | fvogel <fvogelnew1@free.fr> | 2014-11-23 14:07:38 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2014-11-23 14:07:38 (GMT) |
commit | 34b765f14f011c5b1d1f836997b5bfbcf89b6b1e (patch) | |
tree | 2eebb57305ebdb01bed9e8e2072da5fd6783f0ea | |
parent | 7feb0a2ec8f0544fcbf584d987c6102abf6c24ca (diff) | |
download | tk-34b765f14f011c5b1d1f836997b5bfbcf89b6b1e.zip tk-34b765f14f011c5b1d1f836997b5bfbcf89b6b1e.tar.gz tk-34b765f14f011c5b1d1f836997b5bfbcf89b6b1e.tar.bz2 |
Fixing FindDLine was not enough in all cases, now fix its callers (see test case 'A' in bug [7703f947aa])
-rw-r--r-- | generic/tkTextDisp.c | 4 | ||||
-rw-r--r-- | tests/textDisp.test | 15 |
2 files changed, 17 insertions, 2 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index d610d85..2b88ad6 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -4792,8 +4792,8 @@ TextRedrawTag( endIndexPtr = curIndexPtr; } endPtr = FindDLine(dlPtr, endIndexPtr); - if ((endPtr != NULL) && (endPtr->index.linePtr == endIndexPtr->linePtr) - && (endPtr->index.byteIndex < endIndexPtr->byteIndex)) { + if ((endPtr != NULL) + && (TkTextIndexCmp(&endPtr->index,endIndexPtr) < 0)) { endPtr = endPtr->nextPtr; } diff --git a/tests/textDisp.test b/tests/textDisp.test index 96670ac..4b5c8c1 100644 --- a/tests/textDisp.test +++ b/tests/textDisp.test @@ -1275,6 +1275,21 @@ test textDisp-9.12 {TkTextRedrawTag} { update list $tk_textRelayout $tk_textRedraw } {2.0 {2.0 eof}} +test textDisp-9.13 {TkTextRedrawTag} { + .t configure -wrap none + .t delete 1.0 end + for {set i 1} {$i < 10} {incr i} { + .t insert end "Line $i - This is Line [format %c [expr 64+$i]]\n" + } + .t tag add hidden 2.8 2.17 + .t tag add hidden 6.8 7.17 + .t tag configure hidden -background red + .t tag configure hidden -elide true + update + .t tag configure hidden -elide false + update + list $tk_textRelayout $tk_textRedraw +} {{2.0 6.0 7.0} {2.0 6.0 7.0}} test textDisp-10.1 {TkTextRelayoutWindow} { .t configure -wrap char |