|
diff --git a/ui-diff.c b/ui-diff.c index fb836df..e0a72f7 100644 --- a/ ui-diff.c+++ b/ ui-diff.c |
|
@@ -129,3 +129,3 @@ static void inspect_filepair(struct diff_filepair *pair) |
129 | cgit_diff_files(pair->one->sha1, pair->two->sha1, &old_size, &new_size, |
129 | cgit_diff_files(pair->one->sha1, pair->two->sha1, &old_size, &new_size, |
130 | &binary, count_diff_lines); |
130 | &binary, 0, count_diff_lines); |
131 | if (files >= slots) { |
131 | if (files >= slots) { |
@@ -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>"); |
@@ -290,3 +298,3 @@ static void filepair_cb(struct diff_filepair *pair) |
290 | if (cgit_diff_files(pair->one->sha1, pair->two->sha1, &old_size, |
298 | if (cgit_diff_files(pair->one->sha1, pair->two->sha1, &old_size, |
291 | &new_size, &binary, print_line_fn)) |
299 | &new_size, &binary, ctx.qry.context, print_line_fn)) |
292 | cgit_print_error("Error running diff"); |
300 | cgit_print_error("Error running diff"); |
|