Eskil

Diff
Login

Differences From Artifact [46f48b7fe6]:

To Artifact [90db7dad4b]:


139
140
141
142
143
144
145
146
147


148
149
150

151
152

153
154
155
156
157
158
159
139
140
141
142
143
144
145


146
147
148
149

150
151

152
153
154
155
156
157
158
159







-
-
+
+


-
+

-
+







# Insert lineno and text
proc insertLine {top side line text {tag {equal}} {linetag {}}} {
    if {$::eskil($top,view) eq "table"} {
        insertLineTable $top $side $line $text $tag
        return
    }
    $::widgets($top,wDiff$side) insert end "$text\n" $tag
    if {$linetag ne ""} {
        append tag " $linetag"
    if {$linetag eq ""} {
        set linetag $tag
    }
    if {$tag != "equal"} {
        set tag "hl$::HighLightCount $tag"
        set linetag "hl$::HighLightCount $linetag"
    }
    $::widgets($top,wLine$side) insert end [myFormL $line] $tag
    $::widgets($top,wLine$side) insert end [myFormL $line] $linetag
}

# Insert an empty line on one side of the diff.
proc emptyLine {top side {highlight 1}} {
    if {$::eskil($top,view) eq "table"} {
        # This should be ignored for table
        return
610
611
612
613
614
615
616
617

618
619
620
621
622

623
624
625
626
627
628
629
630
631
610
611
612
613
614
615
616

617





618


619
620
621
622
623
624
625







-
+
-
-
-
-
-
+
-
-







            # Marked the whole line as deleted/inserted
            set textline1 [lindex $block1 $t1]
            set textline2 [lindex $block2 $t2]
            if {$::eskil($top,view) eq "table"} {
                # Fall back to proc that handles table
                insertMatchingLinesTable $top $textline1 $textline2
            } else {
                # insertLine cannot be used here since lineNo and text tags
                insertLine $top 1 $doingLine1 $textline1 new1 change
                # are different
                $::widgets($top,wLine1) insert end [myFormL $doingLine1] \
                        "hl$::HighLightCount change"
                $::widgets($top,wDiff1) insert end "$textline1\n" new1
                $::widgets($top,wLine2) insert end [myFormL $doingLine2] \
                insertLine $top 2 $doingLine2 $textline2 new2 change
                        "hl$::HighLightCount change"
                $::widgets($top,wDiff2) insert end "$textline2\n" new2
                incr doingLine1
                incr doingLine2
            }
            if {$finegrain} {
                addChange $top 1 change [expr {$line1 + $t1}] 1 \
                        [expr {$line2 + $t2}] 1
                nextHighlight $top