summaryrefslogtreecommitdiffstats
path: root/tests/textDisp.test
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2014-12-28 20:58:10 (GMT)
committerfvogel <fvogelnew1@free.fr>2014-12-28 20:58:10 (GMT)
commit3c2b8c528158a93d619459fb955cfb489b11b705 (patch)
treeda9941a9756ac0c3e03ea20b0207f748beccb3ec /tests/textDisp.test
parent00c90a36f723fb24cce340db3aaadeac2d26c23b (diff)
downloadtk-3c2b8c528158a93d619459fb955cfb489b11b705.zip
tk-3c2b8c528158a93d619459fb955cfb489b11b705.tar.gz
tk-3c2b8c528158a93d619459fb955cfb489b11b705.tar.bz2
Further fixed text see with indices in elided lines, [5f352f3a71] was not always correct
Diffstat (limited to 'tests/textDisp.test')
-rw-r--r--tests/textDisp.test31
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