From 6f92f332e6a9ee3e16051bda9fe148607af67f65 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Tue, 22 Jun 2010 14:16:12 +0000 Subject: Merge branch 'jh/context-lines' Conflicts: cgit.c cgit.h --- (limited to 'ui-shared.c') diff --git a/ui-shared.c b/ui-shared.c index e991799..c99bcec 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -341,6 +341,13 @@ void cgit_commit_link(char *name, const char *title, const char *class, if ((ctx.qry.ssdiff && !toggle_ssdiff) || (!ctx.qry.ssdiff && toggle_ssdiff)) { html(delim); html("ss=1"); + delim = "&"; + } + if (ctx.qry.context > 0 && ctx.qry.context != 3) { + html(delim); + html("context="); + htmlf("%d", ctx.qry.context); + delim = "&"; } html("'>"); html_txt(name); @@ -382,6 +389,13 @@ void cgit_diff_link(const char *name, const char *title, const char *class, if ((ctx.qry.ssdiff && !toggle_ssdiff) || (!ctx.qry.ssdiff && toggle_ssdiff)) { html(delim); html("ss=1"); + delim = "&"; + } + if (ctx.qry.context > 0 && ctx.qry.context != 3) { + html(delim); + html("context="); + htmlf("%d", ctx.qry.context); + delim = "&"; } html("'>"); html_txt(name); -- cgit v0.9.0.2