about summary refs log tree commit diff
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cgit.c8
-rw-r--r--cgit.css10
2 files changed, 16 insertions, 2 deletions
diff --git a/cgit.c b/cgit.c
index 38bc136..ab25b6a 100644
--- a/cgit.c
+++ b/cgit.c
@@ -258,6 +258,8 @@ static void querystring_cb(const char *name, const char *value)
 		ctx.qry.ssdiff = atoi(value);
 	} else if (!strcmp(name, "all")) {
 		ctx.qry.show_all = atoi(value);
+	} else if (!strcmp(name, "context")) {
+		ctx.qry.context = atoi(value);
 	}
 }
 
@@ -433,6 +435,12 @@ static void process_request(void *cbdata)
 		return;
 	}
 
+	/* If cmd->want_vpath is set, assume ctx->qry.path contains a "virtual"
+	 * in-project path limit to be made available at ctx->qry.vpath.
+	 * Otherwise, no path limit is in effect (ctx->qry.vpath = NULL).
+	 */
+	ctx->qry.vpath = cmd->want_vpath ? ctx->qry.path : NULL;
+
 	if (cmd->want_repo && !ctx->repo) {
 		cgit_print_http_headers(ctx);
 		cgit_print_docstart(ctx);
diff --git a/cgit.css b/cgit.css
index 6198403..6e47eb3 100644
--- a/cgit.css
+++ b/cgit.css
@@ -64,7 +64,7 @@ table#header td.sub {
 }
 
 table.tabs {
-	/* border-bottom: solid 2px #ccc; */
+	border-bottom: solid 3px #ccc;
 	border-collapse: collapse;
 	margin-top: 2em;
 	margin-bottom: 0px;
@@ -102,10 +102,16 @@ table.tabs td.form select {
 	font-size: 90%;
 }
 
+div.path {
+	margin: 0px;
+	padding: 5px 2em 2px 2em;
+	color: #000;
+	background-color: #eee;
+}
+
 div.content {
 	margin: 0px;
 	padding: 2em;
-	border-top: solid 3px #ccc;
 	border-bottom: solid 3px #ccc;
 }
 
Cast set but unused variables to voidJune McEnroe 2020-02-11Declare strlcatJune McEnroe 2020-02-11Check if VDSUSP existsJune McEnroe 2020-02-11Fix completeReplace iterationJune McEnroe 2020-02-11Use pkg(8) to configure on FreeBSDJune McEnroe 2020-02-11Remove legacy codeJune McEnroe 2020-02-11Add INSTALLING section to READMEJune McEnroe