about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2015-08-14 12:47:15 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2015-08-14 15:46:51 +0200
commit23c17d8ff01b96619bc1f71274cb44f1425e10f4 (patch)
treebc551415603a198541513e356b6fa16396868747
parentdiff: move layout to page function (diff)
downloadcgit-pink-23c17d8ff01b96619bc1f71274cb44f1425e10f4.tar.gz
cgit-pink-23c17d8ff01b96619bc1f71274cb44f1425e10f4.zip
log: move layout into page function
Signed-off-by: John Keeping <john@keeping.me.uk>
-rw-r--r--cmd.c2
-rw-r--r--ui-log.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/cmd.c b/cmd.c
index d9f6eff..0bf4c76 100644
--- a/cmd.c
+++ b/cmd.c
@@ -160,7 +160,7 @@ struct cgit_cmd *cgit_get_cmd(void)
 		def_cmd(commit, 1, 0, 1, 0),
 		def_cmd(diff, 1, 0, 1, 0),
 		def_cmd(info, 1, 0, 0, 1),
-		def_cmd(log, 1, 1, 1, 0),
+		def_cmd(log, 1, 0, 1, 0),
 		def_cmd(ls_cache, 0, 0, 0, 0),
 		def_cmd(objects, 1, 0, 0, 1),
 		def_cmd(patch, 1, 0, 1, 0),
diff --git a/ui-log.c b/ui-log.c
index 6bff948..0782478 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -442,8 +442,10 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
 	compile_grep_patterns(&rev.grep_filter);
 	prepare_revision_walk(&rev);
 
-	if (pager)
+	if (pager) {
+		cgit_print_layout_start();
 		html("<table class='list nowrap'>");
+	}
 
 	html("<tr class='nohover'>");
 	if (commit_graph)
@@ -526,6 +528,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
 			html("</li>");
 		}
 		html("</ul>");
+		cgit_print_layout_end();
 	} else if ((commit = get_revision(&rev)) != NULL) {
 		htmlf("<tr class='nohover'><td colspan='%d'>", columns);
 		cgit_log_link("[...]", NULL, NULL, ctx.qry.head, NULL,
olspan='3' class='logmsg'> I uh... don't think I can write tests for this, since macOS's wcwidth is notoriously useless. 2022-03-13Document using -S to connect over IPv4 or IPv6June McEnroe 2022-03-09Always refresh the screen with ^LChristian Kellermann This patch adds an explicit wrefresh call. Under some conditions just flagging the window for redraw does not trigger a redraw and the user has no other means to force redrawing of a window. Without this patch resizing the window would sometimes result in an empty chat window with no way to redraw it. Tested under uxterm and st on OpenBSD. 2022-03-05Update STANDARDS section authors, titles and URLsJune McEnroe 2022-03-02Show own nick on /nick without paramsJune McEnroe 2022-02-26Specify commands which depend on capsJune McEnroe Currently only /setname. 2022-02-26Only add available commands to completeJune McEnroe 2022-02-26Factor out commandAvailableJune McEnroe 2022-02-23Give examples of "general events" 2.1June McEnroe 2022-02-23Add missing unistd.h include in input.cJune McEnroe 2022-02-22Document the interfaceJune McEnroe 2022-02-20Clean up unimplemented editing mode stuffJune McEnroe 2022-02-20Save input buffer contentsJune McEnroe 2022-02-20Share a cut buffer between all edit buffersJune McEnroe 2022-02-20Assert return values in edit testsJune McEnroe 2022-02-20Move mbs out of struct Edit, use a global bufferJune McEnroe This saves 4K in the edit buffers, not to mention all the heap allocations for the separate mbs buffers! There might be a way to be more clever about capacities, but I don't think it's worth it. 2022-02-20Clear edit buffer before running commandJune McEnroe Otherwise a command that switches windows will update the status line while the edit buffer still has input "pending", showing an indicator. 2022-02-20Show indicator in status when window has pending inputJune McEnroe 2022-02-20Use separate edit buffers for each IDJune McEnroe 2022-02-20Make sure new cap is actually larger than new lengthJune McEnroe 2022-02-20Remove unused mbs.len field from struct EditJune McEnroe 2022-02-19Remove unneeded includes in ui.cJune McEnroe 2022-02-19Reimplement tab completeJune McEnroe 2022-02-19Handle errors from editFn, etc.June McEnroe 2022-02-19Reimplement text macrosJune McEnroe 2022-02-19Factor out input handling to input.cJune McEnroe 2022-02-19Factor out window management to window.cJune McEnroe 2022-02-19Enable -Wmissing-prototypesJune McEnroe In other words, warn when a function is missing static. I don't see why this isn't in -Wextra. 2022-02-19Fix edit.[ch] license notice additional permissionsJune McEnroe 2022-02-19Run line editing testsJune McEnroe I know, it feels wrong. 2022-02-18Implement new line editing "library"June McEnroe Losing tab complete and text macros, for now. This new implementation works on an instance of a struct and does not interact with the rest of catgirl, making it possible to copy into another project. Unlike existing line editing libraries, this one is entirely abstract and can be rendered externally. My goal with this library is to be able to implement vi mode. Since it operates on struct instances rather than globals, it might also be possible to give catgirl separate line editing buffers for each window, which would be a nice UX improvement. 2022-02-18Simplify cursor positioning in inputJune McEnroe Do some extra work by adding the portion before the cursor to the input window twice, but simplify the interaction with the split point. This fixes the awkward behaviour when moving the cursor across colour codes where the code would be partially interpreted up to the cursor. 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