dandavison / delta

A syntax-highlighting pager for git, diff, grep, and blame output
https://dandavison.github.io/delta/
MIT License
22.71k stars 378 forks source link

🐛 Can't get `--plus-empty-line-marker-style` / `--minus-empty-line-marker-style` to work #1271

Open phil-blain opened 1 year ago

phil-blain commented 1 year ago

Here are two files which when diff'ed should (as far as I understand) trigger the --plus-empty-line-marker-style style:

cat <<EOF > test.1
a
b
EOF
cat <<EOF > test.2
a

b
EOF
$ diff -u test.1 test.2
--- test.1      2023-01-04 13:14:12.095414000 -0500
+++ test.2      2023-01-04 13:14:34.046515000 -0500
@@ -1,2 +1,3 @@
 a
+
 b

Default delta output (as expected) (diff -u test.1 test.2 |delta --no-gitconfig):
image

Delta output with no background for plus lines (as expected) (diff -u test.1 test.2 |delta --no-gitconfig --plus-style=green):
image

Delta output with with no background for plus lines, and --plus-empty-line-marker-style set (bug?): (diff -u test.1 test.2 |delta --no-gitconfig --plus-style=green --plus-empty-line-marker-style="yellow yellow"):
image

minus-empty-line-marker-style does not seem to work either: diff -u test.2 test.1 | delta --no-gitconfig --plus-style=green --minus-style=red --plus-empty-line-marker-style="yellow yellow" --minus-empty-line-marker-style="yellow yellow" image

Delta version: latest release (0.15.1) Terminal: Windows Terminal 1.15.3467 SSH: OpenSSH_for_Windows_8.9p1 Remote OS: RHEL 8,3

waldyrious commented 1 year ago

I'm facing the same issue. I might be misremembering, but I'm pretty sure this used to work in the past :thinking: