diff-so-fancy icon indicating copy to clipboard operation
diff-so-fancy copied to clipboard

Colors in "diff -u | d-s-f" stop working with stripLeadingSymbols = false

Open patrikndv opened this issue 1 year ago • 1 comments

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.

patrikndv avatar Mar 25 '23 23:03 patrikndv