author | Florian Pritz <bluewind@xssn.at> | 2009-08-09 20:42:45 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2009-08-21 12:17:49 (UTC) |
commit | d67cc7f9d556650438e421cdcda37bc52710bffd (patch) (side-by-side diff) | |
tree | df131c58de7c712550f124f8fb15aef303ff6054 /ui-tree.c | |
parent | 03389d6e67bfda5cb3ff1504db815f09715ec6f4 (diff) | |
download | cgit-d67cc7f9d556650438e421cdcda37bc52710bffd.zip cgit-d67cc7f9d556650438e421cdcda37bc52710bffd.tar.gz cgit-d67cc7f9d556650438e421cdcda37bc52710bffd.tar.bz2 |
Add 'linenumbers' config option
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-tree.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -22,8 +22,9 @@ static void print_text_buffer(const char *name, char *buf, unsigned long size) "<a class='no' id='n%1$d' name='n%1$d' href='#n%1$d'>%1$d</a>\n"; html("<table summary='blob content' class='blob'>\n"); + if (ctx.cfg.linenumbers) { html("<tr><td class='linenumbers'><pre>"); idx = 0; lineno = 0; @@ -35,8 +36,12 @@ static void print_text_buffer(const char *name, char *buf, unsigned long size) idx++; } } html("</pre></td>\n"); + } + else { + html("<tr>\n"); + } if (ctx.repo->source_filter) { html("<td class='lines'><pre><code>"); ctx.repo->source_filter->argv[1] = xstrdup(name); |