diff options
author | fvogel <fvogel@noemail.net> | 2014-12-05 20:33:13 (GMT) |
---|---|---|
committer | fvogel <fvogel@noemail.net> | 2014-12-05 20:33:13 (GMT) |
commit | b45e4749a8ac40590825434bedeb827382ba7b7b (patch) | |
tree | e31b756f58e558dfe0d5272dc256b85b24ade6e8 /tests | |
parent | dfff05afbb56d323067ac8ca86b10b6e078c73e2 (diff) | |
download | tk-b45e4749a8ac40590825434bedeb827382ba7b7b.zip tk-b45e4749a8ac40590825434bedeb827382ba7b7b.tar.gz tk-b45e4749a8ac40590825434bedeb827382ba7b7b.tar.bz2 |
Fixed text count -xpixels with indices in elided lines
FossilOrigin-Name: b06c0452d60c07c14c4105e5dc3980dc6c3c291d
Diffstat (limited to 'tests')
-rw-r--r-- | tests/textDisp.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/textDisp.test b/tests/textDisp.test index fff52d4..c3ed43f 100644 --- a/tests/textDisp.test +++ b/tests/textDisp.test @@ -2065,6 +2065,27 @@ test textDisp-16.40 {text count -xpixels} { [.t count -xpixels 1.0 "1.0 displaylineend"] \ [.t count -xpixels 1.0 end] } {35 -35 0 42 42 42 0} +test textDisp-16.41 {text count -xpixels with indices in elided lines} { + set res {} + .t delete 1.0 end + for {set i 1} {$i < 40} {incr i} { + .t insert end [string repeat "Line $i" 20] + .t insert end "\n" + } + .t configure -wrap none + .t tag add hidden 5.15 20.15 + .t tag configure hidden -elide true + lappend res [.t count -xpixels 5.15 6.0] \ + [.t count -xpixels 5.15 6.1] \ + [.t count -xpixels 6.0 6.1] \ + [.t count -xpixels 6.1 6.2] \ + [.t count -xpixels 6.1 6.0] \ + [.t count -xpixels 6.0 7.0] \ + [.t count -xpixels 6.1 7.1] \ + [.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 delete 1.0 end foreach i {a b c d e f g h i j k l m n o p q r s t u v w x y z} { |