On Mon, Jun 18, 2018 at 10:57:35AM +0800, Andy Green wrote:
> From: John Keeping <[email protected]>
> 
> 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 <[email protected]>
> ---

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?

-- >8 --
Subject: [PATCH] fixup! Add source page

Signed-off-by: John Keeping <[email protected]>
---
 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);
-- 
2.17.1

_______________________________________________
CGit mailing list
[email protected]
https://lists.zx2c4.com/mailman/listinfo/cgit

Reply via email to