@@ -4004,49 +4004,49 @@ proc ishighlighted {id} {
4004
4004
return 0
4005
4005
}
4006
4006
4007
- proc bolden {row font} {
4008
- global canv linehtag selectedline boldrows need_redisplay
4007
+ proc bolden {id font} {
4008
+ global canv linehtag currentid boldids need_redisplay
4009
4009
4010
4010
# need_redisplay = 1 means the display is stale and about to be redrawn
4011
4011
if {$need_redisplay } return
4012
- lappend boldrows $row
4013
- $canv itemconf $linehtag($row ) -font $font
4014
- if {$row == $selectedline } {
4012
+ lappend boldids $id
4013
+ $canv itemconf $linehtag($id ) -font $font
4014
+ if {[ info exists currentid] && $id eq $currentid } {
4015
4015
$canv delete secsel
4016
- set t [eval $canv create rect [$canv bbox $linehtag($row ) ] \
4016
+ set t [eval $canv create rect [$canv bbox $linehtag($id ) ] \
4017
4017
-outline {{}} -tags secsel \
4018
4018
-fill [$canv cget -selectbackground]]
4019
4019
$canv lower $t
4020
4020
}
4021
4021
}
4022
4022
4023
- proc bolden_name {row font} {
4024
- global canv2 linentag selectedline boldnamerows need_redisplay
4023
+ proc bolden_name {id font} {
4024
+ global canv2 linentag currentid boldnameids need_redisplay
4025
4025
4026
4026
if {$need_redisplay } return
4027
- lappend boldnamerows $row
4028
- $canv2 itemconf $linentag($row ) -font $font
4029
- if {$row == $selectedline } {
4027
+ lappend boldnameids $id
4028
+ $canv2 itemconf $linentag($id ) -font $font
4029
+ if {[ info exists currentid] && $id eq $currentid } {
4030
4030
$canv2 delete secsel
4031
- set t [eval $canv2 create rect [$canv2 bbox $linentag($row ) ] \
4031
+ set t [eval $canv2 create rect [$canv2 bbox $linentag($id ) ] \
4032
4032
-outline {{}} -tags secsel \
4033
4033
-fill [$canv2 cget -selectbackground]]
4034
4034
$canv2 lower $t
4035
4035
}
4036
4036
}
4037
4037
4038
4038
proc unbolden {} {
4039
- global boldrows
4039
+ global boldids
4040
4040
4041
4041
set stillbold {}
4042
- foreach row $boldrows {
4043
- if {![ishighlighted [commitonrow $row ] ]} {
4044
- bolden $row mainfont
4042
+ foreach id $boldids {
4043
+ if {![ishighlighted $id ]} {
4044
+ bolden $id mainfont
4045
4045
} else {
4046
- lappend stillbold $row
4046
+ lappend stillbold $id
4047
4047
}
4048
4048
}
4049
- set boldrows $stillbold
4049
+ set boldids $stillbold
4050
4050
}
4051
4051
4052
4052
proc addvhighlight {n} {
@@ -4087,7 +4087,7 @@ proc vhighlightmore {} {
4087
4087
set row [rowofcommit $id ]
4088
4088
if {$r0 <= $row && $row <= $r1 } {
4089
4089
if {![highlighted $row ]} {
4090
- bolden $row mainfontbold
4090
+ bolden $id mainfontbold
4091
4091
}
4092
4092
set vhighlights($id ) 1
4093
4093
}
@@ -4102,7 +4102,7 @@ proc askvhighlight {row id} {
4102
4102
4103
4103
if {[commitinview $id $hlview ]} {
4104
4104
if {[info exists iddrawn($id )] && ![ishighlighted $id ]} {
4105
- bolden $row mainfontbold
4105
+ bolden $id mainfontbold
4106
4106
}
4107
4107
set vhighlights($id ) 1
4108
4108
} else {
@@ -4170,15 +4170,15 @@ proc find_change {name ix op} {
4170
4170
}
4171
4171
4172
4172
proc findcom_change args {
4173
- global nhighlights boldnamerows
4173
+ global nhighlights boldnameids
4174
4174
global findpattern findtype findstring gdttype
4175
4175
4176
4176
stopfinding
4177
4177
# delete previous highlights, if any
4178
- foreach row $boldnamerows {
4179
- bolden_name $row mainfont
4178
+ foreach id $boldnameids {
4179
+ bolden_name $id mainfont
4180
4180
}
4181
- set boldnamerows {}
4181
+ set boldnameids {}
4182
4182
catch {unset nhighlights}
4183
4183
unbolden
4184
4184
unmarkmatches
@@ -4267,9 +4267,8 @@ proc readfhighlight {} {
4267
4267
set fhl_list [lrange $fhl_list [expr {$i +1}] end]
4268
4268
if {$line eq {}} continue
4269
4269
if {![commitinview $line $curview ]} continue
4270
- set row [rowofcommit $line ]
4271
4270
if {[info exists iddrawn($line )] && ![ishighlighted $line ]} {
4272
- bolden $row mainfontbold
4271
+ bolden $line mainfontbold
4273
4272
}
4274
4273
set fhighlights($line ) 1
4275
4274
}
@@ -4321,9 +4320,9 @@ proc askfindhighlight {row id} {
4321
4320
}
4322
4321
if {$isbold && [info exists iddrawn($id )]} {
4323
4322
if {![ishighlighted $id ]} {
4324
- bolden $row mainfontbold
4323
+ bolden $id mainfontbold
4325
4324
if {$isbold > 1} {
4326
- bolden_name $row mainfontbold
4325
+ bolden_name $id mainfontbold
4327
4326
}
4328
4327
}
4329
4328
if {$markingmatches } {
@@ -4343,15 +4342,15 @@ proc markrowmatches {row id} {
4343
4342
if {$findloc eq [mc " All fields" ] || $findloc eq [mc " Headline" ]} {
4344
4343
set m [findmatches $headline ]
4345
4344
if {$m ne {}} {
4346
- markmatches $canv $row $headline $linehtag($row ) $m \
4347
- [$canv itemcget $linehtag($row ) -font] $row
4345
+ markmatches $canv $row $headline $linehtag($id ) $m \
4346
+ [$canv itemcget $linehtag($id ) -font] $row
4348
4347
}
4349
4348
}
4350
4349
if {$findloc eq [mc " All fields" ] || $findloc eq [mc " Author" ]} {
4351
4350
set m [findmatches $author ]
4352
4351
if {$m ne {}} {
4353
- markmatches $canv2 $row $author $linentag($row ) $m \
4354
- [$canv2 itemcget $linentag($row ) -font] $row
4352
+ markmatches $canv2 $row $author $linentag($id ) $m \
4353
+ [$canv2 itemcget $linentag($id ) -font] $row
4355
4354
}
4356
4355
}
4357
4356
}
@@ -4476,7 +4475,7 @@ proc askrelhighlight {row id} {
4476
4475
}
4477
4476
if {[info exists iddrawn($id )]} {
4478
4477
if {$isbold && ![ishighlighted $id ]} {
4479
- bolden $row mainfontbold
4478
+ bolden $id mainfontbold
4480
4479
}
4481
4480
}
4482
4481
set rhighlights($id ) $isbold
@@ -5469,7 +5468,7 @@ proc drawcmittext {id row col} {
5469
5468
global cmitlisted commitinfo rowidlist parentlist
5470
5469
global rowtextx idpos idtags idheads idotherrefs
5471
5470
global linehtag linentag linedtag selectedline
5472
- global canvxmax boldrows boldnamerows fgcolor
5471
+ global canvxmax boldids boldnameids fgcolor
5473
5472
global mainheadid nullid nullid2 circleitem circlecolors ctxbut
5474
5473
5475
5474
# listed is 0 for boundary, 1 for normal, 2 for negative, 3 for left, 4 for right
@@ -5534,22 +5533,22 @@ proc drawcmittext {id row col} {
5534
5533
set nfont mainfont
5535
5534
set isbold [ishighlighted $id ]
5536
5535
if {$isbold > 0} {
5537
- lappend boldrows $row
5536
+ lappend boldids $id
5538
5537
set font mainfontbold
5539
5538
if {$isbold > 1} {
5540
- lappend boldnamerows $row
5539
+ lappend boldnameids $id
5541
5540
set nfont mainfontbold
5542
5541
}
5543
5542
}
5544
- set linehtag($row ) [$canv create text $xt $y -anchor w -fill $fgcolor \
5545
- -text $headline -font $font -tags text]
5546
- $canv bind $linehtag($row ) $ctxbut " rowmenu %X %Y $id "
5547
- set linentag($row ) [$canv2 create text 3 $y -anchor w -fill $fgcolor \
5548
- -text $name -font $nfont -tags text]
5549
- set linedtag($row ) [$canv3 create text 3 $y -anchor w -fill $fgcolor \
5550
- -text $date -font mainfont -tags text]
5543
+ set linehtag($id ) [$canv create text $xt $y -anchor w -fill $fgcolor \
5544
+ -text $headline -font $font -tags text]
5545
+ $canv bind $linehtag($id ) $ctxbut " rowmenu %X %Y $id "
5546
+ set linentag($id ) [$canv2 create text 3 $y -anchor w -fill $fgcolor \
5547
+ -text $name -font $nfont -tags text]
5548
+ set linedtag($id ) [$canv3 create text 3 $y -anchor w -fill $fgcolor \
5549
+ -text $date -font mainfont -tags text]
5551
5550
if {$selectedline == $row } {
5552
- make_secsel $row
5551
+ make_secsel $id
5553
5552
}
5554
5553
set xr [expr {$xt + [font measure $font $headline ]}]
5555
5554
if {$xr > $canvxmax } {
@@ -5757,16 +5756,16 @@ proc drawvisible {} {
5757
5756
proc clear_display {} {
5758
5757
global iddrawn linesegs need_redisplay nrows_drawn
5759
5758
global vhighlights fhighlights nhighlights rhighlights
5760
- global linehtag linentag linedtag boldrows boldnamerows
5759
+ global linehtag linentag linedtag boldids boldnameids
5761
5760
5762
5761
allcanvs delete all
5763
5762
catch {unset iddrawn}
5764
5763
catch {unset linesegs}
5765
5764
catch {unset linehtag}
5766
5765
catch {unset linentag}
5767
5766
catch {unset linedtag}
5768
- set boldrows {}
5769
- set boldnamerows {}
5767
+ set boldids {}
5768
+ set boldnameids {}
5770
5769
catch {unset vhighlights}
5771
5770
catch {unset fhighlights}
5772
5771
catch {unset nhighlights}
@@ -6474,20 +6473,20 @@ proc dispnexttag {} {
6474
6473
}
6475
6474
}
6476
6475
6477
- proc make_secsel {l } {
6476
+ proc make_secsel {id } {
6478
6477
global linehtag linentag linedtag canv canv2 canv3
6479
6478
6480
- if {![info exists linehtag($l )]} return
6479
+ if {![info exists linehtag($id )]} return
6481
6480
$canv delete secsel
6482
- set t [eval $canv create rect [$canv bbox $linehtag($l ) ] -outline {{}} \
6481
+ set t [eval $canv create rect [$canv bbox $linehtag($id ) ] -outline {{}} \
6483
6482
-tags secsel -fill [$canv cget -selectbackground]]
6484
6483
$canv lower $t
6485
6484
$canv2 delete secsel
6486
- set t [eval $canv2 create rect [$canv2 bbox $linentag($l ) ] -outline {{}} \
6485
+ set t [eval $canv2 create rect [$canv2 bbox $linentag($id ) ] -outline {{}} \
6487
6486
-tags secsel -fill [$canv2 cget -selectbackground]]
6488
6487
$canv2 lower $t
6489
6488
$canv3 delete secsel
6490
- set t [eval $canv3 create rect [$canv3 bbox $linedtag($l ) ] -outline {{}} \
6489
+ set t [eval $canv3 create rect [$canv3 bbox $linedtag($id ) ] -outline {{}} \
6491
6490
-tags secsel -fill [$canv3 cget -selectbackground]]
6492
6491
$canv3 lower $t
6493
6492
}
@@ -6553,7 +6552,7 @@ proc selectline {l isnew {desired_loc {}}} {
6553
6552
drawvisible
6554
6553
}
6555
6554
6556
- make_secsel $l
6555
+ make_secsel $id
6557
6556
6558
6557
if {$isnew } {
6559
6558
addtohistory [list selbyid $id ]
@@ -8109,16 +8108,16 @@ proc redrawtags {id} {
8109
8108
$canv itemconf $circleitem($row) -fill $ofill
8110
8109
$canv delete tag.$id
8111
8110
set xt [eval drawtags $id $idpos($id) ]
8112
- $canv coords $linehtag($row ) $xt [lindex $idpos($id) 2]
8113
- set text [$canv itemcget $linehtag($row ) -text]
8114
- set font [$canv itemcget $linehtag($row ) -font]
8111
+ $canv coords $linehtag($id ) $xt [lindex $idpos($id) 2]
8112
+ set text [$canv itemcget $linehtag($id ) -text]
8113
+ set font [$canv itemcget $linehtag($id ) -font]
8115
8114
set xr [expr {$xt + [font measure $font $text ]}]
8116
8115
if {$xr > $canvxmax } {
8117
8116
set canvxmax $xr
8118
8117
setcanvscroll
8119
8118
}
8120
8119
if {[info exists currentid] && $currentid == $id } {
8121
- make_secsel $row
8120
+ make_secsel $id
8122
8121
}
8123
8122
}
8124
8123
@@ -10766,8 +10765,8 @@ set nhl_names {}
10766
10765
set highlight_paths {}
10767
10766
set findpattern {}
10768
10767
set searchdirn -forwards
10769
- set boldrows {}
10770
- set boldnamerows {}
10768
+ set boldids {}
10769
+ set boldnameids {}
10771
10770
set diffelide {0 0}
10772
10771
set markingmatches 0
10773
10772
set linkentercount 0
0 commit comments