summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--ui-diff.c10
-rw-r--r--ui-shared.c14
2 files changed, 23 insertions, 1 deletions
diff --git a/ui-diff.c b/ui-diff.c
index d3a3b2c..e0a72f7 100644
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -158,3 +158,3 @@ void cgit_print_diffstat(const unsigned char *old_sha1,
158{ 158{
159 int i; 159 int i, save_context = ctx.qry.context;
160 160
@@ -165,2 +165,10 @@ void cgit_print_diffstat(const unsigned char *old_sha1,
165 htmlf(" (limited to '%s')", prefix); 165 htmlf(" (limited to '%s')", prefix);
166 html(" (");
167 ctx.qry.context = (save_context > 0 ? save_context : 3) << 1;
168 cgit_self_link("more", NULL, NULL, &ctx);
169 html("/");
170 ctx.qry.context = (save_context > 3 ? save_context : 3) >> 1;
171 cgit_self_link("less", NULL, NULL, &ctx);
172 ctx.qry.context = save_context;
173 html(" context)");
166 html("</div>"); 174 html("</div>");
diff --git a/ui-shared.c b/ui-shared.c
index e991799..c99bcec 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -343,2 +343,9 @@ void cgit_commit_link(char *name, const char *title, const char *class,
343 html("ss=1"); 343 html("ss=1");
344 delim = "&amp;";
345 }
346 if (ctx.qry.context > 0 && ctx.qry.context != 3) {
347 html(delim);
348 html("context=");
349 htmlf("%d", ctx.qry.context);
350 delim = "&amp;";
344 } 351 }
@@ -384,2 +391,9 @@ void cgit_diff_link(const char *name, const char *title, const char *class,
384 html("ss=1"); 391 html("ss=1");
392 delim = "&amp;";
393 }
394 if (ctx.qry.context > 0 && ctx.qry.context != 3) {
395 html(delim);
396 html("context=");
397 htmlf("%d", ctx.qry.context);
398 delim = "&amp;";
385 } 399 }