cgit

commit db4b735464aa9a3a329494b7f042413a65e182f2

Author: Jason A. Donenfeld <Jason@zx2c4.com>

ui-shared: keep filter repolist page in pagination

 ui-shared.c | 6 +++---


diff --git a/ui-shared.c b/ui-shared.c
index 21e163cd6b39d17ef35aeaee2316bd3da36f9895..f8e5bef75852e44b380b0a7a416605d7a7102504 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -144,10 +144,10 @@ static void site_url(const char *page, const char *search, const char *sort, int ofs)
 {
 	char *delim = "?";
 
-	if (ctx.cfg.virtual_root)
-		html_attr(ctx.cfg.virtual_root);
+	if (!page)
+		html_attr(ctx.qry.url);
 	else
-		html_url_path(ctx.cfg.script_name);
+		html_attr(cgit_rooturl());
 
 	if (page) {
 		htmlf("?p=%s", page);