We are going to want to make the contents of `marks' somewhat more
complicated in a moment, so it won't be possible to use what is
effectively a single variable to represent the status of the whole of
the non-heads part of the marks list.

Luckily the strings that replace actual tag names, in the `singletag'
case, are not themselves valid tag names.  So they can be detected
directly.

(Also, `singletag' was not quite right anyway: really it meant that
the tag name(s) had been abbreviated.)

No functional change.

Signed-off-by: Ian Jackson <ijack...@chiark.greenend.org.uk>
---
 gitk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gitk b/gitk
index 805a1c7..42fa41a 100755
--- a/gitk
+++ b/gitk
@@ -6570,7 +6570,6 @@ proc drawtags {id x xt y1} {
        if {$ntags > $maxtags ||
            [totalwidth $marks mainfont $extra] > $maxwidth} {
            # show just a single "n tags..." tag
-           set singletag 1
            if {$ntags == 1} {
                set marks [list "tag..."]
            } else {
@@ -6620,7 +6619,7 @@ proc drawtags {id x xt y1} {
                       $xr $yt $xr $yb $xl $yb $x [expr {$yb - $delta}] \
                       -width 1 -outline $tagoutlinecolor -fill $tagbgcolor \
                       -tags tag.$id]
-           if {$singletag} {
+           if {[regexp {^tag\.\.\.|^\d+ } $tag]} {
                set tagclick [list showtags $id 1]
            } else {
                set tagclick [list showtag $tag_quoted 1]
-- 
2.10.1

Reply via email to