Tk Source Code

Check-in [10ad3b21]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use the new sync command instead of the 'count -update' workaround
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip-438
Files: files | file ages | folders
SHA1:10ad3b21606445b21aaba5cacd4721a7f57edf54
User & Date: fvogel 2015-11-22 20:11:32
Context
2015-11-22
20:59
Merged core-8-5-branch check-in: 04fc47f2 user: fvogel tags: tip-438
20:11
Use the new sync command instead of the 'count -update' workaround check-in: 10ad3b21 user: fvogel tags: tip-438
2015-11-21
12:47
Respect alphabetical order check-in: 09256d04 user: fvogel tags: tip-438
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/text.test.

741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
} -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
    # next line to be fully sure that asynchronous line heights calculation is
    # up-to-date otherwise this test may fail (depending on the computer
    # performance), especially when the . toplevel has small height
    .t count -update -ypixels 1.0 end
    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}







|
<
<
<







741
742
743
744
745
746
747
748



749
750
751
752
753
754
755
} -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
    .t sync



    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}