Eskil

Diff
Login

Differences From Artifact [2a9a8b70c9]:

To Artifact [c31040a233]:


1292
1293
1294
1295
1296
1297
1298













1299
1300
1301
1302
1303
1304
1305
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318







+
+
+
+
+
+
+
+
+
+
+
+
+







        addChange $top 4 change 0 0 0 0
    }
}

#####################################
# Main diff
#####################################

proc highlightTabs {top} {
    foreach item {wDiff1 wDiff2} {
        set w $::widgets($top,$item)
        set count {}
        set x [$w search -regexp -all -count count {\t+} 1.0]
        foreach si $x l $count {
            $w tag add tab $si "$si + $l chars"
        }
        $w tag configure tab -background bisque
        $w tag raise tab
    }
}

# Prepare for a diff by creating needed temporary files
proc prepareFiles {top} {
    set ::eskil($top,cleanup) {}
    if {$::eskil($top,mode) eq "rev"} {
        prepareRev $top
        lappend ::eskil($top,cleanup) "rev"
3109
3110
3111
3112
3113
3114
3115
3116

3117
3118
3119
3120
3121
3122
3123
3122
3123
3124
3125
3126
3127
3128

3129
3130
3131
3132
3133
3134
3135
3136







-
+







# Runtime disable of C version of DiffUtil
proc DisableDiffUtilC {} {
    uplevel \#0 [list source $::eskil(thisDir)/../lib/diffutil/tcl/diffutil.tcl]
}

# Add a debug menu to a toplevel window
proc AddDebugMenu {top} {
    set dMenu [DebugMenu $top.m]
    set dMenu [debugMenu $top.m]
    $dMenu add checkbutton -label "Wrap" -variable wrapstate \
        -onvalue char -offvalue none -command \
        "$top.ft1.tt configure -wrap \$wrapstate ;\
                $top.ft2.tt configure -wrap \$wrapstate"
    $dMenu add command -label "Date Filter" \
        -command {set ::eskil(filter) {^Date}}
    $dMenu add separator
3320
3321
3322
3323
3324
3325
3326


3327
3328
3329
3330
3331
3332
3333
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348







+
+







    $top.m.mt add command -label "Edit Mode" -underline 0 -accelerator Ctrl-E \
            -command [list allowEdit $top] -state disabled
    bind $top <Control-Key-E> [list allowEdit $top]
    $top.m.mt add command -label "Paste Patch" -underline 0 \
            -command [list doPastePatch $top]
    $top.m.mt add command -label "Clear Align" \
            -command [list clearAlign $top] -state disabled
    $top.m.mt add command -label "Highlight tabs" \
            -command [list highlightTabs $top]
    set ::widgets($top,enableAlignCmd) [list \
            $top.m.mt entryconfigure "Clear Align" -state normal]
    set ::widgets($top,disableAlignCmd) [list \
            $top.m.mt entryconfigure "Clear Align" -state disabled]

    if {$::tcl_platform(platform) eq "windows"} {
        if {![catch {package require registry}]} {