summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authorulwlu <ooulwluoo@gmail.com>2020-12-08 23:01:47 +0900
committerGitHub <noreply@github.com>2020-12-08 14:01:47 +0000
commit1dfb1f7fb18e4cc9817d11570c1d6f4ecb2e8081 (patch)
tree0c4f453c645ba523957bfa8af9e031738a30a658 /src/config.rs
parentf83f53f9d3188b657d0659c264eef5cd327c05bc (diff)
Make file style to be colored with same structure while color_only #405 (#436)
* Add config property of color_only * Delete force assign raw to file_style when color_only * Print filemeta in color with rawline when color_only mode * Cargo fmt * Add test if file_style with color_only has style * Add comment about color_only
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index a8718c51..b2cd2eab 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -21,6 +21,7 @@ pub struct Config {
pub available_terminal_width: usize,
pub background_color_extends_to_terminal_width: bool,
pub commit_style: Style,
+ pub color_only: bool,
pub decorations_width: cli::Width,
pub file_added_label: String,
pub file_copied_label: String,
@@ -150,6 +151,7 @@ impl From<cli::Opt> for Config {
.computed
.background_color_extends_to_terminal_width,
commit_style,
+ color_only: opt.color_only,
decorations_width: opt.computed.decorations_width,
file_added_label: opt.file_added_label,
file_copied_label: opt.file_copied_label,