Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
 gitk | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/gitk b/gitk
index 502f0aa..d2e3803 100755
--- a/gitk
+++ b/gitk
@@ -6588,7 +6588,11 @@ proc drawtags {id x xt y1} {
     }
     if {[info exists idheads($id)]} {
        foreach head $idheads($id) {
-           lappend types head
+           if {$head eq $mainhead} {
+               lappend types mainhead
+           } else {
+               lappend types head
+           }
            lappend marks $head
        }
     }
@@ -6607,7 +6611,7 @@ proc drawtags {id x xt y1} {
     set xvals {}
     set wvals {}
     foreach tag $marks type $types {
-       if {$type eq "head" && $tag eq $mainhead} {
+       if {$type eq "mainhead"} {
            set wid [font measure mainfontbold $tag]
        } else {
            set wid [font measure mainfont $tag]
@@ -6639,11 +6643,11 @@ proc drawtags {id x xt y1} {
            set rowtextx([rowofcommit $id]) [expr {$xr + $linespc}]
        } else {
            # draw a head or other ref
-           if {$type eq "head"} {
+           if {$type eq "mainhead"} {
+               set col $headbgcolor
+               set font mainfontbold
+           } elseif {$type eq "head"} {
                set col $headbgcolor
-               if {$tag eq $mainhead} {
-                   set font mainfontbold
-               }
            } else {
                set col "#ddddff"
            }
@@ -6663,7 +6667,7 @@ proc drawtags {id x xt y1} {
                   -font $font -tags [list tag.$id text]]
        if {$type eq "tag" || $type eq "tags"} {
            $canv bind $t <1> $tagclick
-       } elseif {$type eq "head"} {
+       } elseif {$type eq "head" || $type eq "mainhead"} {
            $canv bind $t $ctxbut [list headmenu %X %Y $id $tag_quoted]
        }
     }
-- 
2.9.3

Reply via email to