From d98c65a91c9ee651ae87f715f8e610472326bedf Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Sun, 28 Jun 2020 15:20:51 -0400 Subject: Make diff-highlight feature extend raw feature --- src/features/diff_highlight.rs | 43 ++++++++---------------------------------- 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/src/features/diff_highlight.rs b/src/features/diff_highlight.rs index 13b0814f..1fba29a1 100644 --- a/src/features/diff_highlight.rs +++ b/src/features/diff_highlight.rs @@ -1,3 +1,4 @@ +use crate::features::raw; use crate::features::OptionValueFunction; pub fn make_feature() -> Vec<(String, OptionValueFunction)> { @@ -5,42 +6,13 @@ pub fn make_feature() -> Vec<(String, OptionValueFunction)> { } pub fn _make_feature(bold: bool) -> Vec<(String, OptionValueFunction)> { - builtin_feature!([ + let mut feature = raw::make_feature(); + feature.extend(builtin_feature!([ ( - "commit-style", - String, - None, - _opt => "raw" - ), - ( - "commit-decoration-style", - String, - None, - _opt => "none" - ), - ( - "file-style", - String, - None, - _opt => "raw" - ), - ( - "file-decoration-style", - String, - None, - _opt => "none" - ), - ( - "hunk-header-style", - String, - None, - _opt => "raw" - ), - ( - "hunk-header-decoration-style", - String, + "keep-plus-minus-markers", + bool, None, - _opt => "none" + _opt => false ), ( "minus-style", @@ -84,7 +56,8 @@ pub fn _make_feature(bold: bool) -> Vec<(String, OptionValueFunction)> { Some("color.diff-highlight.newHighlight"), opt => format!("{} reverse", opt.plus_style) ) - ]) + ])); + feature } #[cfg(test)] -- cgit v1.2.3