summary refs log tree commit diff
path: root/contexts.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-10 11:54:33 -0400
committerJune McEnroe <june@causal.agency>2020-07-10 11:54:33 -0400
commitdffae725026a5f19303c36d5250779cf5e8523ab (patch)
tree6b4bc6a0172cd0e8e9a6d26fa1f01176d7153a17 /contexts.c
parentMove search help to footer (diff)
downloadscooper-dffae725026a5f19303c36d5250779cf5e8523ab.tar.gz
scooper-dffae725026a5f19303c36d5250779cf5e8523ab.zip
Add -l and -r options
Diffstat (limited to '')
-rw-r--r--contexts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/contexts.c b/contexts.c
index 77774ae..d8eb4fd 100644
--- a/contexts.c
+++ b/contexts.c
@@ -26,7 +26,7 @@ const char *ContextsQuery = SQL(
 		SELECT time, context
 		FROM events
 		ORDER BY event DESC
-		LIMIT 500 // TODO: Configurable.
+		LIMIT :recent
 	), activeContexts AS (
 		SELECT name, query
 		FROM contexts
@@ -60,6 +60,7 @@ enum kcgi_err pageContexts(struct kreq *req) {
 		|| htmlNav(&html, network, NULL);
 	if (error) return error;
 
+	dbBindInt(stmt.contexts, ":recent", pageRecent);
 	dbBindText(stmt.contexts, ":network", network);
 	if (pagePublic) dbBindInt(stmt.contexts, ":query", false);
 
he ':'s in the tag name. 2021-01-19Prefer tag matches not preceded by [[:alnum:]]June McEnroe Otherwise the "id" in "void" matches for "void id". 2021-01-19Escape \ and / in mtags search patternsJune McEnroe 2021-01-20Use mtags in source-filterJune McEnroe 2021-01-19Add mtags to generate tags for make and mdocJune McEnroe 2021-01-19Map tags to IDs using only [[:alnum:]-._]June McEnroe 2021-01-19Don't use a pager if reading standard inputJune McEnroe 2021-01-19Support BSD make syntax and match *.amJune McEnroe These don't really go together, but... 2021-01-19Match tab following escaped newline in make assignmentsJune McEnroe Otherwise it ends up going into Shell state. 2021-01-18Allow matching lexers using first input lineJune McEnroe