summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogel@noemail.net>2014-12-28 15:09:46 (GMT)
committerfvogel <fvogel@noemail.net>2014-12-28 15:09:46 (GMT)
commit6c796c15bfbeda258c248d6420292446aa934986 (patch)
treec7b13a8f27463634eb4f70368094858903575a0f /tests
parent07d8dfc1899f4cf5352e7a62f1a53a765a1395f3 (diff)
downloadtk-6c796c15bfbeda258c248d6420292446aa934986.zip
tk-6c796c15bfbeda258c248d6420292446aa934986.tar.gz
tk-6c796c15bfbeda258c248d6420292446aa934986.tar.bz2
Fixed Bad counting of the total number of vertical pixels in the text widget, resulting in small change of the Y scrollbar size. Happened because CalculateDisplayLineHeight expects an index at start of a display line, which was not always the case.
FossilOrigin-Name: dd92553e654ab407c07c834cb91643a714ebfb8e
Diffstat (limited to 'tests')
-rw-r--r--tests/text.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/text.test b/tests/text.test
index 6121b85..e75f38a 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -733,6 +733,24 @@ test text-9.2.46 {TextWidgetCmd procedure, "count" option} -setup {
} -cleanup {
destroy .mytop
} -result {1 3}
+test text-9.2.47 {TextWidgetCmd procedure, "count" option} -setup {
+ .t delete 1.0 end
+ update
+ set res {}
+} -body {
+ for {set i 1} {$i < 25} {incr i} {
+ .t insert end "Line $i\n"
+ }
+ .t tag configure hidden -elide true
+ .t tag add hidden 5.7 11.0
+ update
+ set y1 [lindex [.t yview] 1]
+ .t count -displaylines 5.0 11.0
+ set y2 [lindex [.t yview] 1]
+ .t count -displaylines 5.0 12.0
+ set y3 [lindex [.t yview] 1]
+ list [expr {$y1 == $y2}] [expr {$y1 == $y3}]
+} -result {1 1}
# Newer tags are higher priority
.t tag configure elide1 -elide 0