From 951f550b60befeacd7334aebd64c891e72be5ac4 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sat, 29 Nov 2008 18:58:31 +0100 Subject: ui-log: (ab)use extra columns for commit message when showmsg=1 If the commit message has extra long lines it's better to use the author/ files/lines columns to show those lines than to push the columns of screen and force the users to hscroll. Signed-off-by: Lars Hjemli --- ui-log.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'ui-log.c') diff --git a/ui-log.c b/ui-log.c index 631e46d..adc9a66 100644 --- a/ui-log.c +++ b/ui-log.c @@ -35,6 +35,7 @@ void print_commit(struct commit *commit) { struct commitinfo *info; char *tmp; + int cols = 2; info = cgit_parse_commit(commit); html(""); @@ -66,15 +67,15 @@ void print_commit(struct commit *commit) } html("\n"); if (ctx.qry.showmsg) { - html("
"); - html_txt(info->msg); - html("

"); if (ctx.repo->enable_log_filecount) { - html(""); + cols++; if (ctx.repo->enable_log_linecount) - html(""); + cols++; } - html("\n"); + htmlf("
", + cols); + html_txt(info->msg); + html("

\n"); } cgit_free_commitinfo(info); } -- cgit v1.2.3-70-g09d2