From 4b77f523db159a069559432aff8bcefd473d83fa Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Tue, 17 Feb 2015 23:49:29 -0500 Subject: [PATCH] Color diff meta information so it is consistent with Git The lines containing the file name are now colored using the same color as the diff header and index lines: diff --git a/NEWS.adoc b/NEWS.adoc index 6b152f3..bf0c83a 100644 --- a/NEWS.adoc +++ b/NEWS.adoc References #375 --- NEWS.adoc | 1 + include/tig/line.h | 2 ++ tigrc | 2 ++ 3 files changed, 5 insertions(+) diff --git a/NEWS.adoc b/NEWS.adoc index 6b152f3..bf0c83a 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -39,6 +39,7 @@ Bug fixes: - Fix compilation with GNU Make 3.80 by removing `$(abspath)`. (GH #362) - Fix config parsing to support shell-like quoting in user-defined command, e.g. `bind generic :!git log -G"%(prompt Prompt: )"` (GH #371) + - Make diff meta information colors more consistent with Git. (GH #375) tig-2.0.3 --------- diff --git a/include/tig/line.h b/include/tig/line.h index 7d56ac7..b420d63 100644 --- a/include/tig/line.h +++ b/include/tig/line.h @@ -23,6 +23,8 @@ struct ref; #define LINE_INFO(_) \ _(DIFF_HEADER, "diff --"), \ + _(DIFF_DEL_FILE, "--- "), \ + _(DIFF_ADD_FILE, "+++ "), \ _(DIFF_CHUNK, "@@"), \ _(DIFF_ADD, "+"), \ _(DIFF_ADD2, " +"), \ diff --git a/tigrc b/tigrc index 1888292..fd73b85 100644 --- a/tigrc +++ b/tigrc @@ -288,6 +288,8 @@ bind generic v show-version # Show Tig version # Git automatically indents commit messages by four spaces. color "diff --" yellow default +color "--- " yellow default +color "+++ " yellow default color "@@" magenta default color "+" green default color " +" green default -- 2.11.4.GIT