diff options
author | fvogelnew1@free.fr <fvogel> | 2014-12-28 20:58:10 (GMT) |
---|---|---|
committer | fvogelnew1@free.fr <fvogel> | 2014-12-28 20:58:10 (GMT) |
commit | 39f9299231fa41108b01444263ee4389cbae424e (patch) | |
tree | 6a5bcc7eda329fb6684e310c0664730d66b677f9 /tests | |
parent | d40528cb78943f73b5454859692aae2d3ad5f130 (diff) | |
download | tk-39f9299231fa41108b01444263ee4389cbae424e.zip tk-39f9299231fa41108b01444263ee4389cbae424e.tar.gz tk-39f9299231fa41108b01444263ee4389cbae424e.tar.bz2 |
Further fixed text see with indices in elided lines, [5f352f3a71] was not always correct
Diffstat (limited to 'tests')
-rw-r--r-- | tests/textDisp.test | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/textDisp.test b/tests/textDisp.test index 954c1f6..1f85117 100644 --- a/tests/textDisp.test +++ b/tests/textDisp.test @@ -1492,6 +1492,37 @@ test textDisp-11.18 {TkTextSetYView, see in elided lines} { # The index "8.0 lineend" is on screen despite elided -> no scroll .top.t index @0,0 } {4.0} +test textDisp-11.19 {TkTextSetYView, see in elided lines} { + .top.t delete 1.0 end + for {set i 1} {$i < 50} {incr i} { + .top.t insert end "Line $i\n" + } + # button just for having a line with a larger height + button .top.t.b -text "Test" -bd 2 -highlightthickness 2 + .top.t window create 21.0 -window .top.t.b + .top.t tag add hidden 15.36 21.0 + .top.t tag configure hidden -elide true + .top.t configure -height 15 + wm geometry .top 300x200+0+0 + # Indices 21.0, 17.0 and 15.0 are all on the same display line + # therefore index @0,0 shall be the same for all of them + .top.t see end + update + .top.t see 21.0 + update + set ind1 [.top.t index @0,0] + .top.t see end + update + .top.t see 17.0 + update + set ind2 [.top.t index @0,0] + .top.t see end + update + .top.t see 15.0 + update + set ind3 [.top.t index @0,0] + list [expr {$ind1 == $ind2}] [expr {$ind1 == $ind3}] +} {1 1} .t configure -wrap word .t delete 50.0 51.0 |