From 6d68793fa0e50c58a5ab90b6de5ecf8ce061dc04 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:42:23 -0700 Subject: Print line number anchors through one helper --- source/ui-blame.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'source/ui-blame.c') diff --git a/source/ui-blame.c b/source/ui-blame.c index 7254118..b07e57d 100644 --- a/source/ui-blame.c +++ b/source/ui-blame.c @@ -153,19 +153,7 @@ static void emit_entry_hash(struct blame_entry *ent) static void emit_entry_linenumbers(struct blame_entry *ent) { - struct strbuf numbers = STRBUF_INIT; - int lineno = ent->lno; - - while (lineno < ent->lno + ent->num_lines) { - lineno++; - strbuf_addf(&numbers, "%d\n", lineno, lineno, lineno); - if (numbers.len >= HTML_BATCH) { - html_raw(numbers.buf, numbers.len); - strbuf_reset(&numbers); - } - } - html_raw(numbers.buf, numbers.len); - strbuf_release(&numbers); + cgit_print_line_anchors((size_t)ent->lno + 1, (size_t)ent->lno + ent->num_lines); } static void emit_column(struct blame_scoreboard *sb, const char *class, -- cgit