626
global bgcolor fgcolor bglist fglist diffcolors selectbgcolor
627
global headctxmenu progresscanv progressitem progresscoords statusw
628
global fprogitem fprogcoord lastprogupdate progupdatepending
629
+ global have_tk85
630
631
menu .bar
632
.bar add cascade -label "File" -menu .bar.file
846
pack .bleft.mid.labeldiffcontext .bleft.mid.diffcontext -side left
847
set ctext .bleft.ctext
848
text $ctext -background $bgcolor -foreground $fgcolor \
848
- -tabs "[expr {$tabstop * $charspc}]" \
849
-state disabled -font $textfont \
850
-yscrollcommand scrolltext -wrap none
851
+ if {$have_tk85} {
852
+ $ctext conf -tabstyle wordprocessor
853
+ }
854
scrollbar .bleft.sb -command "$ctext yview"
855
pack .bleft.top -side top -fill x
856
pack .bleft.mid -side top -fill x
1138
}
1139
1140
proc savestuff {w} {
1138
- global canv canv2 canv3 ctext cflist mainfont textfont uifont tabstop
1141
+ global canv canv2 canv3 mainfont textfont uifont tabstop
1142
global stuffsaved findmergefiles maxgraphpct
1143
global maxwidth showneartags showlocalchanges
1144
global viewname viewfiles viewargs viewperm nextviewnum
5095
$ctext insert end "$f\n" filesep
5096
$ctext config -state disabled
5097
$ctext yview $commentend
5098
+ settabs 0
5099
}
5100
5101
proc getblobline {bf id} {
5137
fconfigure $mdf -blocking 0
5138
set mdifffd($id) $mdf
5139
set np [llength [lindex $parentlist $l]]
5140
+ settabs $np
5141
filerun $mdf [list getmergediffline $mdf $id $np]
5142
}
5143
5215
proc startdiff {ids} {
5216
global treediffs diffids treepending diffmergeid nullid nullid2
5217
5218
+ settabs 1
5219
set diffids $ids
5220
catch {unset diffmergeid}
5221
if {![info exists treediffs($ids)] ||
5521
}
5522
}
5523
5524
+proc settabs {{firstab {}}} {
5525
+ global firsttabstop tabstop textfont ctext have_tk85
5526
+
5527
+ if {$firstab ne {} && $have_tk85} {
5528
+ set firsttabstop $firstab
5529
+ }
5530
+ set w [font measure $textfont "0"]
5531
+ if {$firsttabstop != 0} {
5532
+ $ctext conf -tabs [list [expr {$firsttabstop * $w}] \
5533
+ [expr {($firsttabstop + $tabstop) * $w}]]
5534
+ } elseif {$have_tk85 || $tabstop != 8} {
5535
+ $ctext conf -tabs [expr {$tabstop * $w}]
5536
+ } else {
5537
+ $ctext conf -tabs {}
5538
+ }
5539
+}
5540
+
5541
proc incrsearch {name ix op} {
5542
global ctext searchstring searchdirn
5543
5689
5690
proc incrfont {inc} {
5691
global mainfont textfont ctext canv phase cflist showrefstop
5669
- global charspc tabstop
5692
global stopped entries
5693
unmarkmatches
5694
set mainfont [lreplace $mainfont 1 1 [expr {[lindex $mainfont 1] + $inc}]]
5695
set textfont [lreplace $textfont 1 1 [expr {[lindex $textfont 1] + $inc}]]
5696
setcoords
5675
- $ctext conf -font $textfont -tabs "[expr {$tabstop * $charspc}]"
5697
+ settabs
5698
$cflist conf -font $textfont
5699
$ctext tag conf filesep -font [concat $textfont bold]
5700
foreach e $entries {
5898
# fill the details pane with info about this line
5899
$ctext conf -state normal
5900
clear_ctext
5901
+ settabs 0
5902
$ctext insert end "Parent:\t"
5903
$ctext insert end $id link0
5904
setlink $id link0
7803
}
7804
$ctext conf -state normal
7805
clear_ctext
7806
+ settabs 0
7807
set linknum 0
7808
if {![info exists tagcontents($tag)]} {
7809
catch {
7975
proc prefsok {} {
7976
global maxwidth maxgraphpct
7977
global oldprefs prefstop showneartags showlocalchanges
7954
- global charspc ctext tabstop
7978
7979
catch {destroy $prefstop}
7980
unset prefstop
7958
- $ctext configure -tabs "[expr {$tabstop * $charspc}]"
7981
+ settabs
7982
if {$showlocalchanges != $oldprefs(showlocalchanges)} {
7983
if {$showlocalchanges} {
7984
doshowlocalchanges
8383
set nullid "0000000000000000000000000000000000000000"
8384
set nullid2 "0000000000000000000000000000000000000001"
8385
8386
+set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}]
8387
8388
set runq {}
8389
set history {}
8400
set linkentercount 0
8401
set need_redisplay 0
8402
set nrows_drawn 0
8403
+set firsttabstop 0
8404
8405
set nextviewnum 1
8406
set curview 0