summaryrefslogtreecommitdiffstats
path: root/tests/textDisp.test
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2014-12-28 18:00:53 (GMT)
committerfvogel <fvogelnew1@free.fr>2014-12-28 18:00:53 (GMT)
commit00c90a36f723fb24cce340db3aaadeac2d26c23b (patch)
treeb81d342878b82f52d74a31560926c46c13e9efe7 /tests/textDisp.test
parentc496046c21dec2ceef5e03a5205ea6d0cc0fde9f (diff)
downloadtk-00c90a36f723fb24cce340db3aaadeac2d26c23b.zip
tk-00c90a36f723fb24cce340db3aaadeac2d26c23b.tar.gz
tk-00c90a36f723fb24cce340db3aaadeac2d26c23b.tar.bz2
Further fixed text count -ypixels with indices in elided lines, [30d6b995dc] was not always correct
Diffstat (limited to 'tests/textDisp.test')
-rw-r--r--tests/textDisp.test14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/textDisp.test b/tests/textDisp.test
index 6c21700..954c1f6 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -2692,7 +2692,6 @@ test textDisp-19.17 {count -ypixels with indices in elided lines} {
[.t count -ypixels 25.4 27.50] \
[.t count -ypixels 35.0 38.0]
.t yview 35.0
- update
lappend res [.t count -ypixels 5.0 25.0]
} [list [expr {4 * $fixedHeight}] [expr {3 * $fixedHeight}] 0 0 0 0 0 0 [expr {5 * $fixedHeight}] [expr {- 5 * $fixedHeight}] [expr {2 * $fixedHeight}] [expr {3 * $fixedHeight}] [expr {5 * $fixedHeight}]]
test textDisp-19.18 {count -ypixels with indices in elided lines} {
@@ -2712,6 +2711,19 @@ test textDisp-19.18 {count -ypixels with indices in elided lines} {
update
lappend res [.t count -ypixels 5.0 25.0]
} [list [expr {5 * $fixedHeight}] [expr {5 * $fixedHeight}]]
+test textDisp-19.19 {count -ypixels with indices in elided lines} {
+ .t configure -wrap char
+ .t delete 1.0 end
+ for {set i 1} {$i < 25} {incr i} {
+ .t insert end [string repeat "Line $i -" 6]
+ .t insert end "\n"
+ }
+ .t tag add hidden 5.27 11.0
+ .t tag configure hidden -elide true
+ .t yview 5.0
+ update
+ set res [list [.t count -ypixels 5.0 11.0] [.t count -ypixels 5.0 11.20]]
+} [list [expr {1 * $fixedHeight}] [expr {2 * $fixedHeight}]]
.t delete 1.0 end
.t insert end "Line 1"
for {set i 2} {$i <= 200} {incr i} {