X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/42a7eb9c73457319a3fd5441ff26046fc9b31dad..98fcf7227c8dda520c864ea8a51012934115258f:/ui-log.c diff --git a/ui-log.c b/ui-log.c index 8d774b0..d38e40a 100644 --- a/ui-log.c +++ b/ui-log.c @@ -59,6 +59,9 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *path, i int argc = 2; int i; + if (!tip) + argv[1] = cgit_query_head; + if (grep) argv[argc++] = fmt("--grep=%s", grep); if (path) { @@ -110,17 +113,15 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *path, i if (pager) { html("
"); if (ofs > 0) { - html(" [prev] "); + cgit_log_link("[prev]", NULL, NULL, cgit_query_head, + cgit_query_sha1, cgit_query_path, + ofs - cnt); + html(" "); } - if ((commit = get_revision(&rev)) != NULL) { - html(" [next] "); + cgit_log_link("[next]", NULL, NULL, cgit_query_head, + cgit_query_sha1, cgit_query_path, + ofs + cnt); } html("
"); }