]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-shared.c
ui-diff: Add links to increase/decrease number of context lines in diffs
[ps-cgit] / ui-shared.c
index e9917993fb2d4181bf3adb6ff4c01dea0cb52f26..c99bcecdf7905fa373d8839d83e3935d9c30faeb 100644 (file)
@@ -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);