diff options
author | Lars Hjemli <hjemli@gmail.com> | 2010-06-22 16:16:12 +0200 |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-06-22 16:16:12 +0200 |
commit | 6f92f332e6a9ee3e16051bda9fe148607af67f65 (patch) | |
tree | 49cb7d145fbf40793b220efdc92cd80ab2c6ca05 /ui-shared.c | |
parent | Merge branch 'jh/path-limit' (diff) | |
parent | ui-diff: Add links to increase/decrease number of context lines in diffs (diff) | |
download | cgit-pink-6f92f332e6a9ee3e16051bda9fe148607af67f65.tar.gz cgit-pink-6f92f332e6a9ee3e16051bda9fe148607af67f65.zip |
Merge branch 'jh/context-lines'
Conflicts: cgit.c cgit.h
Diffstat (limited to '')
-rw-r--r-- | ui-shared.c | 14 |
1 files changed, 14 insertions, 0 deletions
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); |