From 775b9865085db8c9192bb89faa568ed18984636c Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Fri, 14 Aug 2026 09:32:16 -1000 Subject: Give the stub and tag rows their full width --- source/ui-log.c | 10 +++++++--- source/ui-refs.c | 4 +++- source/ui-tag.c | 14 +++++++------- source/ui-tree.c | 6 +++--- 4 files changed, 20 insertions(+), 14 deletions(-) (limited to 'source') diff --git a/source/ui-log.c b/source/ui-log.c index 4bd17fa..9e9e31f 100644 --- a/source/ui-log.c +++ b/source/ui-log.c @@ -152,7 +152,9 @@ static void print_graph_above(struct rev_info *revs, struct strbuf *graph, while (!graph_next_line(revs->graph, graph)) { html(""); html(graph->buf); - htmlf("\n", columns); + // The graph cell is one of the columns, so the filler spans + // the rest. + htmlf("\n", columns - 1); strbuf_setlen(graph, 0); } } @@ -301,9 +303,11 @@ static void print_commit(struct commit *commit, struct rev_info *revs) print_graph_padding(revs, &graphbuf, msg_lines); } else - html(""); + html(""); - htmlf("\n", columns - (revs->graph ? 1 : 0), + // Either way one cell is already on the row, so the message + // spans the remaining columns. + htmlf("\n", columns - 1, ctx.qry.showmsg ? " class='logmsg'" : ""); html_txt(msgbuf.buf); html("\n"); diff --git a/source/ui-refs.c b/source/ui-refs.c index 9897839..8490417 100644 --- a/source/ui-refs.c +++ b/source/ui-refs.c @@ -109,8 +109,10 @@ static int print_branch(struct refinfo *ref) html(""); cgit_print_age(info->committer_date, info->committer_tz, -1); } else { - html(""); + // The object link sits in the message column, and the empty + // tail cells keep the row as wide as the header. cgit_object_link(ref->object); + html(""); } html("\n"); return 0; diff --git a/source/ui-tag.c b/source/ui-tag.c index c384f91..656280e 100644 --- a/source/ui-tag.c +++ b/source/ui-tag.c @@ -19,7 +19,7 @@ static void print_object_row(struct object *obj) { - html("tagged object"); + html("tagged object"); cgit_object_link(obj); html("\n"); } @@ -27,8 +27,8 @@ static void print_object_row(struct object *obj) static void print_download_row(const char *revname) { html("download"); - cgit_print_snapshot_links(ctx.repo, revname, "
"); - html(""); + cgit_print_snapshot_links(ctx.repo, revname, "
"); + html("\n"); } /* @@ -71,17 +71,17 @@ static void print_annotated_tag(const char *revname, cgit_print_layout_start(); html("\n"); - html("\n", oid_to_hex(oid)); if (info->tagger_date > 0) { - html("\n"); } if (info->tagger) { - html("
tag name"); + html("
tag name"); html_txt(revname); htmlf(" (%s)
tag date"); + html("
tag date"); html_txt(show_date(info->tagger_date, info->tagger_tz, cgit_date_mode(DATE_ISO8601))); html("
tagged by"); + html("
tagged by"); cgit_open_filter(ctx.repo->email_filter, info->tagger_email, "tag"); html_txt(info->tagger); @@ -105,7 +105,7 @@ static void print_lightweight_tag(const char *revname, struct object *obj) { cgit_print_layout_start(); html("\n"); - html("\n"); print_object_row(obj); diff --git a/source/ui-tree.c b/source/ui-tree.c index 21b9547..7d24d53 100644 --- a/source/ui-tree.c +++ b/source/ui-tree.c @@ -293,9 +293,9 @@ static void print_ls_row(const struct object_id *oid, const char *pathname, if (type == OBJ_BAD) { // The name comes from the tree, so it can hold // anything a commit was allowed to record. - html("", oid_to_hex(oid)); + htmlf(" %s\n", oid_to_hex(oid)); goto cleanup; } } @@ -408,7 +408,7 @@ static void ls_head(void) html(""); html(""); html(""); - html(""); html("\n"); } -- cgit v2.8.0
tag name"); + html("
tag name"); html_txt(revname); html("
Bad object: "); + html("
Bad object: "); html_txt(name); - htmlf(" %s
ModeNameSize"); + html("