From f501e23887c1878ece1c6ece56cb751135b34c26 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Wed, 23 Dec 2020 13:03:34 +0000 Subject: 308 side by side tabs (#459) * Add #308 bug reproduction delta --no-gitconfig --diff-highlight --side-by-side < etc/examples/308-side-by-side-tabs.diff * Expand tabs under diff-highlight and diff-so-fancy Fixes #308 --- etc/examples/308-side-by-side-tabs.diff | 12 ++++++++++++ src/features/diff_highlight.rs | 10 ++++------ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 etc/examples/308-side-by-side-tabs.diff diff --git a/etc/examples/308-side-by-side-tabs.diff b/etc/examples/308-side-by-side-tabs.diff new file mode 100644 index 00000000..5abb52ae --- /dev/null +++ b/etc/examples/308-side-by-side-tabs.diff @@ -0,0 +1,12 @@ +diff --git .config/git/config .config/git/config +index bc4ae2e..b058f99 100644 +--- .config/git/config ++++ .config/git/config +@@ -26,7 +21,6 @@ + # Show summary of changes to submodules. See also: + # https://git-scm.com/book/en/v2/Git-Tools-Submodules + submoduleSummary = true +- showStash = true + + [diff] + tool = vimdiff diff --git a/src/features/diff_highlight.rs b/src/features/diff_highlight.rs index ea7ac7c9..0f4d5de3 100644 --- a/src/features/diff_highlight.rs +++ b/src/features/diff_highlight.rs @@ -7,13 +7,11 @@ pub fn make_feature() -> Vec<(String, OptionValueFunction)> { pub fn _make_feature(bold: bool) -> Vec<(String, OptionValueFunction)> { let mut feature = raw::make_feature(); + feature = feature + .into_iter() + .filter(|(s, _)| s != "keep-plus-minus-markers" && s != "tabs") + .collect(); feature.extend(builtin_feature!([ - ( - "keep-plus-minus-markers", - bool, - None, - _opt => false - ), ( "minus-style", String, -- cgit v1.2.3