diff options
Diffstat (limited to '')
| -rw-r--r-- | source/ui-log.c | 11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 6 insertions, 5 deletions
diff --git a/source/ui-log.c b/source/ui-log.c index 8adc5ac..1ac9a77 100644 --- a/source/ui-log.c +++ b/source/ui-log.c @@ -367,9 +367,10 @@ static char *next_token(char **src) /* * Whether there is a page after this one is answered by pulling one more - * commit off the walk. + * commit off the walk. The links carry the path as it was asked for, since a + * followed rename leaves ctx.qry.vpath at the name the last row's commit knew. */ -static void print_pager(struct rev_info *revs, int ofs, int cnt) +static void print_pager(struct rev_info *revs, const char *path, int ofs, int cnt) { struct commit *more = get_revision(revs); @@ -381,7 +382,7 @@ static void print_pager(struct rev_info *revs, int ofs, int cnt) if (ofs > 0) { html("<li>"); cgit_log_link( - "[prev]", NULL, NULL, ctx.qry.head, ctx.qry.oid, ctx.qry.vpath, + "[prev]", NULL, NULL, ctx.qry.head, ctx.qry.oid, path, ofs - cnt, ctx.qry.grep, ctx.qry.search, ctx.qry.showmsg, ctx.qry.follow ); html("</li>"); @@ -389,7 +390,7 @@ static void print_pager(struct rev_info *revs, int ofs, int cnt) if (more) { html("<li>"); cgit_log_link( - "[next]", NULL, NULL, ctx.qry.head, ctx.qry.oid, ctx.qry.vpath, + "[next]", NULL, NULL, ctx.qry.head, ctx.qry.oid, path, ofs + cnt, ctx.qry.grep, ctx.qry.search, ctx.qry.showmsg, ctx.qry.follow ); html("</li>"); @@ -616,7 +617,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern commit->parents = NULL; } if (pager) { - print_pager(&rev, ofs, cnt); + print_pager(&rev, path, ofs, cnt); cgit_print_layout_end(); } else { if ((commit = get_revision(&rev))) { |
