]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-shared.c
ui-diff: Add link to ignore/show whitespace changes in diffs
[ps-cgit] / ui-shared.c
index c99bcecdf7905fa373d8839d83e3935d9c30faeb..f46c935cdeeb784ddaed4fcaf7c2e57dee49a9d9 100644 (file)
@@ -349,6 +349,11 @@ void cgit_commit_link(char *name, const char *title, const char *class,
                htmlf("%d", ctx.qry.context);
                delim = "&";
        }
+       if (ctx.qry.ignorews) {
+               html(delim);
+               html("ignorews=1");
+               delim = "&";
+       }
        html("'>");
        html_txt(name);
        html("</a>");
@@ -397,6 +402,11 @@ void cgit_diff_link(const char *name, const char *title, const char *class,
                htmlf("%d", ctx.qry.context);
                delim = "&amp;";
        }
+       if (ctx.qry.ignorews) {
+               html(delim);
+               html("ignorews=1");
+               delim = "&amp;";
+       }
        html("'>");
        html_txt(name);
        html("</a>");