The previous code tracked its change to the length of `marks' by
updateing the variable `ntags'.  This is a bit fragile and cumbersome,
and we are going to want to modify `marks' some more in a moment.

Instead, simply reset ntags to the length of marks, after we have
possibly done any needed abbreviation.

No functional change.

Signed-off-by: Ian Jackson <[email protected]>
---
 gitk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gitk b/gitk
index 42fa41a..31aecda 100755
--- a/gitk
+++ b/gitk
@@ -6575,9 +6575,10 @@ proc drawtags {id x xt y1} {
            } else {
                set marks [list [format "%d tags..." $ntags]]
            }
-           set ntags 1
        }
     }
+    set ntags [llength $marks]
+
     if {[info exists idheads($id)]} {
        set marks [concat $marks $idheads($id)]
        set nheads [llength $idheads($id)]
-- 
2.10.1

Reply via email to