Eskil

Check-in [2b2e19adcb]
Login

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

Overview
Comment:Corrected a bug that made highlight of changes get misaligned. Initialise nonewline and autoclose earlier to make sure they work.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2b2e19adcb20e6bc3527d1ae1e00214d99be181e
User & Date: peter 2007-04-02 06:11:53.000
Context
2007-04-02
06:12
No Log check-in: 58c0df5859 user: peter tags: trunk
06:11
Corrected a bug that made highlight of changes get misaligned. Initialise nonewline and autoclose earlier to make sure they work. check-in: 2b2e19adcb user: peter tags: trunk
06:08
Make ps print runnable check-in: 8bab80a0d2 user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/eskil.tcl.
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Stop Tk from meddling with the command line by copying it first.
set ::eskil(argv) $::argv
set ::eskil(argc) $::argc
set ::argv {}
set ::argc 0

set debug 0
set diffver "Version 2.1+ 2007-02-24"
set ::thisScript [file join [pwd] [info script]]

# Do initalisations for needed packages and globals.
# This is not run until needed to speed up command line error reporting.
proc Init {} {
    package require Tk 8.4
    catch {package require textSearch}







|







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Stop Tk from meddling with the command line by copying it first.
set ::eskil(argv) $::argv
set ::eskil(argc) $::argc
set ::argv {}
set ::argc 0

set debug 0
set diffver "Version 2.1+ 2007-04-02"
set ::thisScript [file join [pwd] [info script]]

# Do initalisations for needed packages and globals.
# This is not run until needed to speed up command line error reporting.
proc Init {} {
    package require Tk 8.4
    catch {package require textSearch}
545
546
547
548
549
550
551

552
553
554
555
556
557
558
                lappend block2 $apa
            }
            set apa [insertMatchingBlocks $top $block1 $block2]
            if {$apa >= 0} {
                addChange $top $apa change $line1 $n1 $line2 $n2
            } else {
                addMapLines $top [expr {-$apa}]

                return 1
            }
        } else {
            # No extra parsing at all.
            for {set t 0} {$t < $n1} {incr t} {
                gets $ch1 apa
                insertLine $top 1 $doingLine1 $apa $tag1







>







545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
                lappend block2 $apa
            }
            set apa [insertMatchingBlocks $top $block1 $block2]
            if {$apa >= 0} {
                addChange $top $apa change $line1 $n1 $line2 $n2
            } else {
                addMapLines $top [expr {-$apa}]
                # In this case, a change is not visible
                return 1
            }
        } else {
            # No extra parsing at all.
            for {set t 0} {$t < $n1} {incr t} {
                gets $ch1 apa
                insertLine $top 1 $doingLine1 $apa $tag1
572
573
574
575
576
577
578


579
580
581
582
583
584
585
                for {set t $n2} {$t < $n1} {incr t} {
                    emptyLine $top 2
                }
                addChange $top $n1 $tag1 $line1 $n1 $line2 $n2
            }
        }
    }


}

proc enableRedo {top} {
    $top.m.mf entryconfigure "Redo Diff" -state normal
    $top.m.mt entryconfigure "Merge"     -state normal
}








>
>







573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
                for {set t $n2} {$t < $n1} {incr t} {
                    emptyLine $top 2
                }
                addChange $top $n1 $tag1 $line1 $n1 $line2 $n2
            }
        }
    }
    # Empty return value
    return
}

proc enableRedo {top} {
    $top.m.mf entryconfigure "Redo Diff" -state normal
    $top.m.mt entryconfigure "Merge"     -state normal
}

3139
3140
3141
3142
3143
3144
3145



3146
3147
3148
3149
3150
3151
3152
complete eskil 'C/-/`eskil --query -`/'}
}

# Go through all command line arguments
proc parseCommandLine {} {
    global dirdiff Pref




    if {$::eskil(argc) == 0} {
        Init
        makeDiffWin
        return
    }
    
    set allOpts {







>
>
>







3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
complete eskil 'C/-/`eskil --query -`/'}
}

# Go through all command line arguments
proc parseCommandLine {} {
    global dirdiff Pref

    set ::eskil(autoclose) 0
    set ::eskil(ignorenewline) 0

    if {$::eskil(argc) == 0} {
        Init
        makeDiffWin
        return
    }
    
    set allOpts {
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
    set dodir 0
    set doclip 0
    set files ""
    set nextArg ""
    set revNo 1
    set dopatch 0
    set foreach 0
    set ::eskil(autoclose) 0
    set ::eskil(ignorenewline) 0
    foreach arg $::eskil(argv) {
        if {$nextArg != ""} {
            if {$nextArg eq "mergeFile"} {
                set opts(mergeFile) [file join [pwd] $arg]
            } elseif {$nextArg eq "printFile"} {
                set opts(printFile) [file join [pwd] $arg]
            } elseif {$nextArg eq "revision"} {







<
<







3179
3180
3181
3182
3183
3184
3185


3186
3187
3188
3189
3190
3191
3192
    set dodir 0
    set doclip 0
    set files ""
    set nextArg ""
    set revNo 1
    set dopatch 0
    set foreach 0


    foreach arg $::eskil(argv) {
        if {$nextArg != ""} {
            if {$nextArg eq "mergeFile"} {
                set opts(mergeFile) [file join [pwd] $arg]
            } elseif {$nextArg eq "printFile"} {
                set opts(printFile) [file join [pwd] $arg]
            } elseif {$nextArg eq "revision"} {