diff-so-fancy
diff-so-fancy copied to clipboard
Colors in "diff -u | d-s-f" stop working with stripLeadingSymbols = false
When not having any settings in the [color "diff-highlight"]
section of gitconfig, the highlight still works in git commands by inverting foreground and background colors. When additionally setting stripLeadingSymbols = false
, the behaviour is still correct in git commands. So far so good.
However, with stripLeadingSymbols = false
the behaviour is not correct anymore when piping the output of diff -u
to diff-so-fancy. Assuming diff-highlight settings are set, only lines with highlight will be colored but all other +/- lines will have no color at all. When diff-highlight settings are not set, no +/- line at all will have color (not even the lines with highlight). Expected behavior is that stripLeadingSymbols = false
should not affect coloring of +/- lines, and when diff-highlight settings are not set the highlight should invert foreground and background colors like it does correctly in git commands and when stripLeadingSymbols = true
.