Eskil

Diff
Login

Differences From Artifact [3d0c0442d1]:

To Artifact [cc93b5dec3]:


487
488
489
490
491
492
493

494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
    #puts "COLOR UPDATE W $win K $key R $row C $col TB1 $tabIdx1 TB2 $tabIdx2"
    #puts "   [string length $xxx] '$xxx'"
    #puts "   CHANGEME"

    # Currently the displayed string is just $w1$w2
    # The table might have cut of display of a cell so make sure to stay
    # within the boundaries.

    set l1 [string length $w1]
    set mid "$tabIdx1 + $l1 char"
    if {[$w compare $mid >= $tabIdx2]} {
        set mid $tabIdx2
    }
    $w tag add new1 $tabIdx1 $mid
    $w tag add new2 $mid     $tabIdx2

    # Get the displayed string
    set xxx [$w get $tabIdx1 $tabIdx2]
    if {$xxx ne "$w1$w2"} {
        # Make sure dots are coloured
        $w tag add change "$tabIdx2 - 3c" $tabIdx2
    }
}

# Insert one line in each text widget.







>

|



|
|


|







487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
    #puts "COLOR UPDATE W $win K $key R $row C $col TB1 $tabIdx1 TB2 $tabIdx2"
    #puts "   [string length $xxx] '$xxx'"
    #puts "   CHANGEME"

    # Currently the displayed string is just $w1$w2
    # The table might have cut of display of a cell so make sure to stay
    # within the boundaries.
    set txIdx1 [$w index $tabIdx1+1c]
    set l1 [string length $w1]
    set mid "$txIdx1 + $l1 char"
    if {[$w compare $mid >= $tabIdx2]} {
        set mid $tabIdx2
    }
    $w tag add new1 $txIdx1 $mid
    $w tag add new2 $mid    $tabIdx2

    # Get the displayed string
    set xxx [$w get $txIdx1 $tabIdx2]
    if {$xxx ne "$w1$w2"} {
        # Make sure dots are coloured
        $w tag add change "$tabIdx2 - 3c" $tabIdx2
    }
}

# Insert one line in each text widget.
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554

        # Lap 2, collect cell changes once we have the row id
        set col -1
        foreach w1 $words1 w2 $words2 r $rs {
            incr col
            # Equal? Skip
            if {[llength $r] <= 2} continue
            dict set ::eskil($top,tablechanges) $id,$col w1 $w1 
            dict set ::eskil($top,tablechanges) $id,$col w2 $w2
            dict set ::eskil($top,tablechanges) $id,$col r  $r
        }

        incr doingLine1
        incr doingLine2
        return
    }








|
|
|







539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555

        # Lap 2, collect cell changes once we have the row id
        set col -1
        foreach w1 $words1 w2 $words2 r $rs {
            incr col
            # Equal? Skip
            if {[llength $r] <= 2} continue
            dict set ::eskil($top,tablechanges) $id,$col "w1" $w1 
            dict set ::eskil($top,tablechanges) $id,$col "w2" $w2
            dict set ::eskil($top,tablechanges) $id,$col "r"  $r
        }

        incr doingLine1
        incr doingLine2
        return
    }