]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-tree.c
Add support for line number in url fragment
[ps-cgit] / ui-tree.c
index 75ce449e99cc12c1d9bb8a3e8a655761d5898d7b..634132f8d4554647cc4a87e46ad6fcb3d899a2aa 100644 (file)
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -43,7 +43,7 @@ static void print_object(const unsigned char *sha1, char *path)
        while(idx < size) {
                if (buf[idx] == '\n') {
                        buf[idx] = '\0';
-                       htmlf("<tr><td class='no'>%d</td><td class='txt'>",
+                       htmlf("<tr><td class='no'><a name='%d'>%1$d</a></td><td class='txt'>",
                              ++lineno);
                        html_txt(buf + start);
                        html("</td></tr>\n");