summaryrefslogtreecommitdiffstats
path: root/src/parse_styles.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse_styles.rs')
-rw-r--r--src/parse_styles.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/parse_styles.rs b/src/parse_styles.rs
index eea3c11f..1bee9e54 100644
--- a/src/parse_styles.rs
+++ b/src/parse_styles.rs
@@ -22,6 +22,7 @@ pub fn parse_styles(opt: &cli::Opt) -> HashMap<String, Style> {
make_hunk_styles(opt, &mut styles);
make_commit_file_hunk_header_styles(opt, &mut styles);
make_line_number_styles(opt, &mut styles);
+ make_blame_styles(opt, &mut styles);
make_grep_styles(opt, &mut styles);
make_merge_conflict_styles(opt, &mut styles);
make_misc_styles(opt, &mut styles);
@@ -360,6 +361,33 @@ fn make_commit_file_hunk_header_styles(opt: &cli::Opt, styles: &mut HashMap<&str
]);
}
+fn make_blame_styles(opt: &cli::Opt, styles: &mut HashMap<&str, StyleReference>) {
+ if let Some(style_string) = &opt.blame_code_style {
+ styles.insert(
+ "blame-code-style",
+ style_from_str(
+ style_string,
+ None,
+ None,
+ opt.computed.true_color,
+ opt.git_config.as_ref(),
+ ),
+ );
+ };
+ if let Some(style_string) = &opt.blame_separator_style {
+ styles.insert(
+ "blame-separator-style",
+ style_from_str(
+ style_string,
+ None,
+ None,
+ opt.computed.true_color,
+ opt.git_config.as_ref(),
+ ),
+ );
+ };
+}
+
fn make_grep_styles(opt: &cli::Opt, styles: &mut HashMap<&str, StyleReference>) {
styles.extend([
(