summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--cgit.c2
-rw-r--r--cgit.h1
-rw-r--r--cgitrc.5.txt4
-rw-r--r--ui-tree.c5
4 files changed, 12 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index b0e1c44..a4788cb 100644
--- a/cgit.c
+++ b/cgit.c
@@ -68,2 +68,4 @@ void config_cb(const char *name, const char *value)
68 ctx.cfg.logo_link = xstrdup(value); 68 ctx.cfg.logo_link = xstrdup(value);
69 else if (!strcmp(name, "linenumbers"))
70 ctx.cfg.linenumbers = atoi(value);
69 else if (!strcmp(name, "module-link")) 71 else if (!strcmp(name, "module-link"))
diff --git a/cgit.h b/cgit.h
index adb8da4..2fdc531 100644
--- a/cgit.h
+++ b/cgit.h
@@ -176,2 +176,3 @@ struct cgit_config {
176 int local_time; 176 int local_time;
177 int linenumbers;
177 int max_repo_count; 178 int max_repo_count;
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index 3c35b02..a762ccc 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -148,2 +148,6 @@ logo-link::
148 148
149linenumbers::
150 If set to "1" lines in tree view will have numbers.
151 Default value: "0".
152
149max-commit-count:: 153max-commit-count::
diff --git a/ui-tree.c b/ui-tree.c
index 7bf2ad2..f64e6e0 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -25,2 +25,3 @@ static void print_text_buffer(const char *name, char *buf, unsigned long size)
25 25
26 if (ctx.cfg.linenumbers) {
26 html("<tr><td class='linenumbers'><pre>"); 27 html("<tr><td class='linenumbers'><pre>");
@@ -38,2 +39,6 @@ static void print_text_buffer(const char *name, char *buf, unsigned long size)
38 html("</pre></td>\n"); 39 html("</pre></td>\n");
40 }
41 else {
42 html("<tr>\n");
43 }
39 44