-rw-r--r-- | ui-diff.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -158,3 +158,3 @@ void cgit_print_diffstat(const unsigned char *old_sha1, { - int i; + int i, save_context = ctx.qry.context; @@ -165,2 +165,10 @@ void cgit_print_diffstat(const unsigned char *old_sha1, htmlf(" (limited to '%s')", prefix); + html(" ("); + ctx.qry.context = (save_context > 0 ? save_context : 3) << 1; + cgit_self_link("more", NULL, NULL, &ctx); + html("/"); + ctx.qry.context = (save_context > 3 ? save_context : 3) >> 1; + cgit_self_link("less", NULL, NULL, &ctx); + ctx.qry.context = save_context; + html(" context)"); html("</div>"); |