summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-01-07 15:35:04 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-01-07 15:35:04 (GMT)
commit14ce825dcd0062ad80540787437ee9decddd4ba1 (patch)
treefe35033258031da4aa2a9c7bbf602319a0fa41d6 /tests
parent202013b4ffd4f5ab925eeed4d3fdcaa4a40c552e (diff)
downloadtk-14ce825dcd0062ad80540787437ee9decddd4ba1.zip
tk-14ce825dcd0062ad80540787437ee9decddd4ba1.tar.gz
tk-14ce825dcd0062ad80540787437ee9decddd4ba1.tar.bz2
[Bug 2677890]: Fix odd text widget update problem that had scrollbars being
unable to cover the whole widget. Fix is to reify the range to update sooner.
Diffstat (limited to 'tests')
-rw-r--r--tests/textDisp.test26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/textDisp.test b/tests/textDisp.test
index 116d623..d349b17 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: textDisp.test,v 1.42.2.1 2008/10/10 16:28:25 dgp Exp $
+# RCS: @(#) $Id: textDisp.test,v 1.42.2.2 2010/01/07 15:35:04 dkf Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -3846,6 +3846,30 @@ test textDisp-33.5 {bold or italic fonts} win {
} {italic font measurement ok}
destroy .tt
+test textDisp-34.1 {Text widgets multi-scrolling problem: Bug 2677890} -setup {
+ pack [text .t1 -width 10 -yscrollcommand {.sy set}] \
+ [ttk::scrollbar .sy -orient vertical -command {.t1 yview}] \
+ -side left -fill both
+ bindtags .sy {}; # No clicky!
+ set txt ""
+ for {set i 0} {$i < 99} {incr i} {
+ lappend txt "$i" [list pc $i] "\n" ""
+ }
+ set result {}
+} -body {
+ .t1 insert end {*}$txt
+ update
+ lappend result [.sy get]
+ .t1 replace 6.0 6.0+1c "*"
+ lappend result [.sy get]
+ after 0 {lappend result [.sy get]}
+ after 1000 {lappend result [.sy get]}
+ vwait result;vwait result
+ return $result
+} -cleanup {
+ destroy .t1 .sy
+} -result {{0.0 1.0} {0.0 1.0} {0.0 1.0} {0.0 0.24}}
+
deleteWindows
option clear