From mboxrd@z Thu Jan 1 00:00:00 1970 From: andy at warmcat.com (Andy Green) Date: Tue, 19 Jun 2018 03:27:51 +0800 Subject: [PATCH v2 04/15] Add source page In-Reply-To: <20180618190816.GP1922@john.keeping.me.uk> References: <152928998685.10419.7869045561776063625.stgit@mail.warmcat.com> <152929065510.10419.14882888513835689446.stgit@mail.warmcat.com> <20180618190816.GP1922@john.keeping.me.uk> Message-ID: <9454C322-641F-4CA6-917D-8FD1B9857646@warmcat.com> On June 19, 2018 3:08:16 AM GMT+08:00, John Keeping wrote: >On Mon, Jun 18, 2018 at 10:57:35AM +0800, Andy Green wrote: >> From: John Keeping >> >> We are about to introduce rendering of content for the tree view. >This >> source page will allow bypassing the renderer and accessing the >content >> of the current tree view. >> >> Signed-off-by: John Keeping >> --- > >While testing this series, I noticed a slight deficiency in the source >view in that nothing in the header is highlighted. > >The following fixup seems like the right thing to do. What do you >think? OK thanks I'll squash it in. -Andy >-- >8 -- >Subject: [PATCH] fixup! Add source page > >Signed-off-by: John Keeping >--- > ui-shared.c | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/ui-shared.c b/ui-shared.c >index f358a68..c769ff8 100644 >--- a/ui-shared.c >+++ b/ui-shared.c >@@ -1006,6 +1006,10 @@ void cgit_print_pageheader(void) > if (ctx.qry.page && !strcmp(ctx.qry.page, "blame")) > cgit_blame_link("blame", NULL, hc("blame"), ctx.qry.head, > ctx.qry.sha1, ctx.qry.vpath); >+ else if (ctx.qry.page && !strcmp(ctx.qry.page, "source")) >+ cgit_source_link("tree", NULL, hc("source"), >+ ctx.qry.head, ctx.qry.sha1, >+ ctx.qry.vpath); > else > cgit_tree_link("tree", NULL, hc("tree"), ctx.qry.head, > ctx.qry.sha1, ctx.qry.vpath);