diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-01-07 15:32:18 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-01-07 15:32:18 (GMT) |
commit | e32170009614d7f09c5f913b2767bd6cf0e15f7e (patch) | |
tree | 4e2fe64ce7917e1ec5cfdbef709a9d9deb5b8089 /tests/textDisp.test | |
parent | 078fd483b608ea19f2d47f36f5a6a8a3a1c04405 (diff) | |
download | tk-e32170009614d7f09c5f913b2767bd6cf0e15f7e.zip tk-e32170009614d7f09c5f913b2767bd6cf0e15f7e.tar.gz tk-e32170009614d7f09c5f913b2767bd6cf0e15f7e.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/textDisp.test')
-rw-r--r-- | tests/textDisp.test | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/textDisp.test b/tests/textDisp.test index 6d3212c..1d72ca5 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.43 2008/10/08 20:15:26 dgp Exp $ +# RCS: @(#) $Id: textDisp.test,v 1.44 2010/01/07 15:32:18 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 |