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.
Unified · Split
| @@ -35,6 +35,7 @@ void print_commit(struct commit *commit) · 34 unmodified lines | ||
| 35 | 35 | { |
| 36 | 36 | struct commitinfo *info; |
| 37 | 37 | char *tmp; |
| 38 | + int cols = 2; | |
| 38 | 39 | |
| 39 | 40 | info = cgit_parse_commit(commit); |
| 40 | 41 | html("<tr><td>"); |
| @@ -66,15 +67,15 @@ void print_commit(struct commit *commit) · 25 unmodified lines | ||
| 66 | 67 | } |
| 67 | 68 | html("</td></tr>\n"); |
| 68 | 69 | if (ctx.qry.showmsg) { |
| 69 | − html("<tr class='nohover'><td></td><td><div class='commit-msg'>"); | |
| 70 | − html_txt(info->msg); | |
| 71 | − html("</div><br/></td><td></td>"); | |
| 72 | 70 | if (ctx.repo->enable_log_filecount) { |
| 73 | − html("<td></td>"); | |
| 71 | + cols++; | |
| 74 | 72 | if (ctx.repo->enable_log_linecount) |
| 75 | − html("<td></td>"); | |
| 73 | + cols++; | |
| 76 | 74 | } |
| 77 | − html("</tr>\n"); | |
| 75 | + htmlf("<tr class='nohover'><td></td><td colspan='%d'><div class='commit-msg'>", | |
| 76 | + cols); | |
| 77 | + html_txt(info->msg); | |
| 78 | + html("</div><br/></td></tr>\n"); | |
| 78 | 79 | } |
| 79 | 80 | cgit_free_commitinfo(info); |
| 80 | 81 | } |