Eskil

Check-in [65d9923993]
Login

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

Overview
Comment:Highlight tabs tool
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 65d9923993c3d2e67305375f9b9eddcfc994f7893ea2963aad69e1d3ba93fe89
User & Date: peter 2019-11-09 00:09:21
Context
2019-11-09
00:37
Started to rebuild debug proc editor check-in: 96d2928ff7 user: peter tags: trunk
00:09
Highlight tabs tool check-in: 65d9923993 user: peter tags: trunk
00:08
List links better in dir diff check-in: 8e962c7fd6 user: peter tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/eskil.tcl.

1292
1293
1294
1295
1296
1297
1298













1299
1300
1301
1302
1303
1304
1305
....
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
....
3320
3321
3322
3323
3324
3325
3326


3327
3328
3329
3330
3331
3332
3333
        addChange $top 4 change 0 0 0 0
    }
}

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














# 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"
................................................................................
# 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]
    $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
................................................................................
    $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


    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}]} {







>
>
>
>
>
>
>
>
>
>
>
>
>







 







|







 







>
>







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
....
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
....
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
        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"
................................................................................
# 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]
    $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
................................................................................
    $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}]} {