summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-12 17:54:23 -0400
committerJune McEnroe <june@causal.agency>2020-07-12 17:54:23 -0400
commitdda85e243cfb338bdaf0dc992949254a6870aae8 (patch)
tree309f3c9de350ef6d061e77853149d856b25d5599
parentAdd search paging links (diff)
downloadscooper-dda85e243cfb338bdaf0dc992949254a6870aae8.tar.gz
scooper-dda85e243cfb338bdaf0dc992949254a6870aae8.zip
Handle no search results
-rw-r--r--search.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/search.c b/search.c
index 2d6e417..07a8064 100644
--- a/search.c
+++ b/search.c
@@ -139,5 +139,13 @@ enum kcgi_err searchPage(struct kreq *req) {
 		if (error) return error;
 	}
 
+	if (!rows) {
+		error = 0
+			|| khtml_elem(&html, KELEM_TR)
+			|| khtml_elem(&html, KELEM_TH)
+			|| khtml_puts(&html, "No matching messages");
+		if (error) return error;
+	}
+
 	return htmlFooter(&html) || khtml_close(&html);
 }
74bd9&follow=1'>Factor out input handling to input.cJune McEnroe 2022-02-19Factor out window management to window.cJune McEnroe 2022-02-19Enable -Wmissing-prototypesJune McEnroe 2022-02-19Fix edit.[ch] license notice additional permissionsJune McEnroe 2022-02-19Run line editing testsJune McEnroe 2022-02-18Implement new line editing "library"June McEnroe 2022-02-18Simplify cursor positioning in inputJune McEnroe 2022-02-18Fix M-f orderingJune McEnroe 2022-02-12Move sandman build to scripts/MakefileJune McEnroe 2022-02-12Use compat_readpassphrase.c on LinuxJune McEnroe 2022-02-12Copy RPP defines from oconfigureJune McEnroe