summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-06-28 15:20:51 -0400
committerDan Davison <dandavison7@gmail.com>2020-06-28 15:36:16 -0400
commitd98c65a91c9ee651ae87f715f8e610472326bedf (patch)
tree0c212eaf957e76e98245a631b93e06246ee10de0
parentcf3f5a6ab1752ffdaf762327cdf14a54e2a3b333 (diff)
Make diff-highlight feature extend raw feature
-rw-r--r--src/features/diff_highlight.rs43
1 files 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)]