summaryrefslogtreecommitdiffabout
path: root/ui-tree.c
authorFlorian Pritz <bluewind@xssn.at>2009-08-09 20:42:45 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2009-08-21 12:17:49 (UTC)
commitd67cc7f9d556650438e421cdcda37bc52710bffd (patch) (unidiff)
treedf131c58de7c712550f124f8fb15aef303ff6054 /ui-tree.c
parent03389d6e67bfda5cb3ff1504db815f09715ec6f4 (diff)
downloadcgit-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>
Diffstat (limited to 'ui-tree.c') (more/less context) (show whitespace changes)
-rw-r--r--ui-tree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui-tree.c b/ui-tree.c
index 7bf2ad2..f64e6e0 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -23,6 +23,7 @@ static void print_text_buffer(const char *name, char *buf, unsigned long size)
23 23
24 html("<table summary='blob content' class='blob'>\n"); 24 html("<table summary='blob content' class='blob'>\n");
25 25
26 if (ctx.cfg.linenumbers) {
26 html("<tr><td class='linenumbers'><pre>"); 27 html("<tr><td class='linenumbers'><pre>");
27 idx = 0; 28 idx = 0;
28 lineno = 0; 29 lineno = 0;
@@ -36,6 +37,10 @@ static void print_text_buffer(const char *name, char *buf, unsigned long size)
36 } 37 }
37 } 38 }
38 html("</pre></td>\n"); 39 html("</pre></td>\n");
40 }
41 else {
42 html("<tr>\n");
43 }
39 44
40 if (ctx.repo->source_filter) { 45 if (ctx.repo->source_filter) {
41 html("<td class='lines'><pre><code>"); 46 html("<td class='lines'><pre><code>");