]> git.ipfire.org Git - thirdparty/git.git/commitdiff
gitk: do not hard-code color of search results in commit list
authorAlexander Ogorodov <bnfour@bnfour.net>
Tue, 18 Mar 2025 06:27:04 +0000 (13:27 +0700)
committerBn4 <bnfour@bnfour.net>
Thu, 15 May 2025 10:24:30 +0000 (17:24 +0700)
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>
gitk

diff --git a/gitk b/gitk
index bc9efa18566fb8ff602ec7df431060d05ec66f63..02a8b8eb8140aa30cc763a40ce9c0010c45aa249 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -7139,7 +7139,7 @@ proc findselectline {l} {
 
 # mark the bits of a headline or author that match a find string
 proc markmatches {canv l str tag matches font row} {
-    global selectedline
+    global selectedline foundbgcolor
 
     set bbox [$canv bbox $tag]
     set x0 [lindex $bbox 0]
@@ -7153,7 +7153,7 @@ proc markmatches {canv l str tag matches font row} {
         set xlen [font measure $font [string range $str 0 [expr {$end}]]]
         set t [$canv create rect [expr {$x0+$xoff}] $y0 \
                    [expr {$x0+$xlen+2}] $y1 \
-                   -outline {} -tags [list match$l matches] -fill yellow]
+                   -outline {} -tags [list match$l matches] -fill $foundbgcolor]
         $canv lower $t
         if {$row == $selectedline} {
             $canv raise $t secsel