@@ -395,7 +395,7 @@ proc confirm_popup msg {
395
395
396
396
proc makewindow {} {
397
397
global canv canv2 canv3 linespc charspc ctext cflist
398
- global textfont mainfont uifont
398
+ global textfont mainfont uifont tabstop
399
399
global findtype findtypemenu findloc findstring fstring geometry
400
400
global entries sha1entry sha1string sha1but
401
401
global maincursor textcursor curtextcursor
@@ -615,6 +615,7 @@ proc makewindow {} {
615
615
pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left
616
616
set ctext .bleft.ctext
617
617
text $ctext -background $bgcolor -foreground $fgcolor \
618
+ -tabs " [ expr {$tabstop * $charspc }] " \
618
619
-state disabled -font $textfont \
619
620
-yscrollcommand scrolltext -wrap none
620
621
scrollbar .bleft.sb -command " $ctext yview"
@@ -824,7 +825,7 @@ proc click {w} {
824
825
}
825
826
826
827
proc savestuff {w} {
827
- global canv canv2 canv3 ctext cflist mainfont textfont uifont
828
+ global canv canv2 canv3 ctext cflist mainfont textfont uifont tabstop
828
829
global stuffsaved findmergefiles maxgraphpct
829
830
global maxwidth showneartags
830
831
global viewname viewfiles viewargs viewperm nextviewnum
@@ -838,6 +839,7 @@ proc savestuff {w} {
838
839
puts $f [list set mainfont $mainfont ]
839
840
puts $f [list set textfont $textfont ]
840
841
puts $f [list set uifont $uifont ]
842
+ puts $f [list set tabstop $tabstop ]
841
843
puts $f [list set findmergefiles $findmergefiles ]
842
844
puts $f [list set maxgraphpct $maxgraphpct ]
843
845
puts $f [list set maxwidth $maxwidth ]
@@ -4696,12 +4698,13 @@ proc redisplay {} {
4696
4698
4697
4699
proc incrfont {inc} {
4698
4700
global mainfont textfont ctext canv phase cflist
4701
+ global charspc tabstop
4699
4702
global stopped entries
4700
4703
unmarkmatches
4701
4704
set mainfont [lreplace $mainfont 1 1 [expr {[lindex $mainfont 1] + $inc }]]
4702
4705
set textfont [lreplace $textfont 1 1 [expr {[lindex $textfont 1] + $inc }]]
4703
4706
setcoords
4704
- $ctext conf -font $textfont
4707
+ $ctext conf -font $textfont -tabs " [ expr { $tabstop * $charspc } ] "
4705
4708
$cflist conf -font $textfont
4706
4709
$ctext tag conf filesep -font [concat $textfont bold]
4707
4710
foreach e $entries {
@@ -5852,7 +5855,7 @@ proc doprefs {} {
5852
5855
global maxwidth maxgraphpct diffopts
5853
5856
global oldprefs prefstop showneartags
5854
5857
global bgcolor fgcolor ctext diffcolors selectbgcolor
5855
- global uifont
5858
+ global uifont tabstop
5856
5859
5857
5860
set top .gitkprefs
5858
5861
set prefstop $top
@@ -5890,6 +5893,9 @@ proc doprefs {} {
5890
5893
checkbutton $top .ntag.b -variable showneartags
5891
5894
pack $top .ntag.b $top .ntag.l -side left
5892
5895
grid x $top .ntag -sticky w
5896
+ label $top .tabstopl -text " tabstop" -font optionfont
5897
+ entry $top .tabstop -width 10 -textvariable tabstop
5898
+ grid x $top .tabstopl $top .tabstop -sticky w
5893
5899
5894
5900
label $top .cdisp -text " Colors: press to choose"
5895
5901
$top .cdisp configure -font $uifont
@@ -5988,9 +5994,11 @@ proc prefscan {} {
5988
5994
proc prefsok {} {
5989
5995
global maxwidth maxgraphpct
5990
5996
global oldprefs prefstop showneartags
5997
+ global charspc ctext tabstop
5991
5998
5992
5999
catch {destroy $prefstop }
5993
6000
unset prefstop
6001
+ $ctext configure -tabs " [ expr {$tabstop * $charspc }] "
5994
6002
if {$maxwidth != $oldprefs(maxwidth)
5995
6003
|| $maxgraphpct != $oldprefs(maxgraphpct) } {
5996
6004
redisplay
@@ -6296,6 +6304,7 @@ if {$tclencoding == {}} {
6296
6304
set mainfont {Helvetica 9}
6297
6305
set textfont {Courier 9}
6298
6306
set uifont {Helvetica 9 bold}
6307
+ set tabstop 8
6299
6308
set findmergefiles 0
6300
6309
set maxgraphpct 50
6301
6310
set maxwidth 16
0 commit comments