gitk: do not hard-code color of search results in commit list
A global variable exists that holds the color name used to highlight search results everywhere, except that in the commit list the color is still hard-coded to "yellow". Use the global variable there as well. Signed-off-by: Alexander Ogorodov <bnfour@bnfour.net>
Alexander Ogorodov committed
Mar 18, 2025 at 13:27 UTC
9cad4a9dc0358c959db42186eb40736e5fb5e788
1 file changed
+2
-2
gitk
+2
-2
@@ -7139,7 +7139,7 @@ proc findselectline {l} {
7139
7140
# mark the bits of a headline or author that match a find string
7141
proc markmatches {canv l str tag matches font row} {
7142
- global selectedline
7142
+ global selectedline foundbgcolor
7143
7144
set bbox [$canv bbox $tag]
7145
set x0 [lindex $bbox 0]
@@ -7153,7 +7153,7 @@ proc markmatches {canv l str tag matches font row} {
7153
set xlen [font measure $font [string range $str 0 [expr {$end}]]]
7154
set t [$canv create rect [expr {$x0+$xoff}] $y0 \
7155
[expr {$x0+$xlen+2}] $y1 \
7156
- -outline {} -tags [list match$l matches] -fill yellow]
7156
+ -outline {} -tags [list match$l matches] -fill $foundbgcolor]
7157
$canv lower $t
7158
if {$row == $selectedline} {
7159
$canv raise $t secsel