From 20742203a379f3d8453036627a7263a5693bb77f Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Wed, 4 Feb 2009 13:09:12 +0100 Subject: [PATCH] Replace usage of the main-author color with the author color It is used in draw_author() which is used by the main, blame and tree views. --- NEWS | 2 ++ tig.c | 8 +++++--- tigrc.5.txt | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 733c98b..ceb0290 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ Incompatibilities: - The "tree-parent" action was renamed to "parent". Warnings will be emitted for transition. - Remove parsing of deprecated option -S and subcommands log and diff. + - The "author" color replaces "main-author". Setting the latter will + now set the "author" color. Improvements: diff --git a/tig.c b/tig.c index df44fcf..bd9a7a4 100644 --- a/tig.c +++ b/tig.c @@ -918,7 +918,7 @@ LINE(PP_REFS, "Refs: ", COLOR_RED, COLOR_DEFAULT, 0), \ LINE(COMMIT, "commit ", COLOR_GREEN, COLOR_DEFAULT, 0), \ LINE(PARENT, "parent ", COLOR_BLUE, COLOR_DEFAULT, 0), \ LINE(TREE, "tree ", COLOR_BLUE, COLOR_DEFAULT, 0), \ -LINE(AUTHOR, "author ", COLOR_CYAN, COLOR_DEFAULT, 0), \ +LINE(AUTHOR, "author ", COLOR_GREEN, COLOR_DEFAULT, 0), \ LINE(COMMITTER, "committer ", COLOR_MAGENTA, COLOR_DEFAULT, 0), \ LINE(SIGNOFF, " Signed-off-by", COLOR_YELLOW, COLOR_DEFAULT, 0), \ LINE(ACKED, " Acked-by", COLOR_YELLOW, COLOR_DEFAULT, 0), \ @@ -930,7 +930,6 @@ LINE(DATE, "", COLOR_BLUE, COLOR_DEFAULT, 0), \ LINE(LINE_NUMBER, "", COLOR_CYAN, COLOR_DEFAULT, 0), \ LINE(TITLE_BLUR, "", COLOR_WHITE, COLOR_BLUE, 0), \ LINE(TITLE_FOCUS, "", COLOR_WHITE, COLOR_BLUE, A_BOLD), \ -LINE(MAIN_AUTHOR, "", COLOR_GREEN, COLOR_DEFAULT, 0), \ LINE(MAIN_COMMIT, "", COLOR_DEFAULT, COLOR_DEFAULT, 0), \ LINE(MAIN_TAG, "", COLOR_MAGENTA, COLOR_DEFAULT, A_BOLD), \ LINE(MAIN_LOCAL_TAG,"", COLOR_MAGENTA, COLOR_DEFAULT, 0), \ @@ -1411,6 +1410,9 @@ option_color_command(int argc, const char *argv[]) } else if (!string_enum_compare(argv[0], "main-date", strlen("main-date"))) { info = get_line_info("date"); + } else if (!string_enum_compare(argv[0], "main-author", strlen("main-author"))) { + info = get_line_info("author"); + } else { config_msg = "Unknown color name"; return ERR; @@ -2030,7 +2032,7 @@ draw_author(struct view *view, const char *author) author = initials; } - return draw_field(view, LINE_MAIN_AUTHOR, author, opt_author_cols, trim); + return draw_field(view, LINE_AUTHOR, author, opt_author_cols, trim); } static bool diff --git a/tigrc.5.txt b/tigrc.5.txt index bbca17d..2beb269 100644 --- a/tigrc.5.txt +++ b/tigrc.5.txt @@ -370,6 +370,7 @@ title-blur The title window of any backgrounded view. delimiter Delimiter shown for truncated lines. line-number Line numbers. date The commit date. +author The commit author. ------------------------------------------------------------------------------ ifdef::backend-xhtml11[] @@ -378,7 +379,6 @@ ifdef::backend-xhtml11[] endif::backend-xhtml11[] Main view colors: ------------------------------------------------------------------------------ -main-author The commit author. main-revgraph The revision graph. main-commit The commit comment. main-head Label of the current branch. -- 2.30.2