From: Dominik Vogt Date: Mon, 29 Oct 2007 13:35:36 +0000 (+0100) Subject: Added color option main-revgraph to color the revision graph. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f83b1c333d1babbbf3b2b52d042b7af696fb9d28;p=tig.git Added color option main-revgraph to color the revision graph. Signed-off-by: Jonas Fonseca --- diff --git a/tig.c b/tig.c index fbc65b9..7130943 100644 --- a/tig.c +++ b/tig.c @@ -626,6 +626,7 @@ LINE(MAIN_DELIM, "", COLOR_MAGENTA, COLOR_DEFAULT, 0), \ LINE(MAIN_TAG, "", COLOR_MAGENTA, COLOR_DEFAULT, A_BOLD), \ LINE(MAIN_REMOTE, "", COLOR_YELLOW, COLOR_DEFAULT, A_BOLD), \ LINE(MAIN_REF, "", COLOR_CYAN, COLOR_DEFAULT, A_BOLD), \ +LINE(MAIN_REVGRAPH,"", COLOR_MAGENTA, COLOR_DEFAULT, 0), \ LINE(TREE_DIR, "", COLOR_DEFAULT, COLOR_DEFAULT, A_NORMAL), \ LINE(TREE_FILE, "", COLOR_DEFAULT, COLOR_DEFAULT, A_NORMAL), \ LINE(STAT_SECTION, "", COLOR_CYAN, COLOR_DEFAULT, 0), \ @@ -4085,12 +4086,12 @@ main_draw(struct view *view, struct line *line, unsigned int lineno, bool select } col += AUTHOR_COLS; - if (type != LINE_CURSOR) - wattrset(view->win, A_NORMAL); if (opt_rev_graph && commit->graph_size) { size_t i; + if (type != LINE_CURSOR) + wattrset(view->win, get_line_attr(LINE_MAIN_REVGRAPH)); wmove(view->win, lineno, col); /* Using waddch() instead of waddnstr() ensures that * they'll be rendered correctly for the cursor line. */ @@ -4100,6 +4101,8 @@ main_draw(struct view *view, struct line *line, unsigned int lineno, bool select waddch(view->win, ' '); col += commit->graph_size + 1; } + if (type != LINE_CURSOR) + wattrset(view->win, A_NORMAL); wmove(view->win, lineno, col); diff --git a/tigrc.5.txt b/tigrc.5.txt index d61d02d..521880b 100644 --- a/tigrc.5.txt +++ b/tigrc.5.txt @@ -324,7 +324,7 @@ Appearance of the various columns in the main view, including the '~' used for delimiting long author names and labels for tag and branch references. *main-date*, *main-author*, *main-commit*, *main-delim*, *main-tag*, -*main-ref*, *main-remote* +*main-ref*, *main-remote*, *main-revgraph* --