Skip to content

Only-added/only-removed lines aren't highlighted #490

@AndiDog

Description

@AndiDog

When lines are changed (removal+insertion), there's red/green color highlighting

Screenshot 2024-05-05 at 18 23 30
$ diff -u <(printf 'a\n') <(printf 'a\nb\nc\nd\n') | diff-so-fancy --color always | hexdump -C | tail -n 5
000003d0  31 6d 1b 5b 33 38 3b 35  3b 31 33 6d 40 20 2f 64  |1m.[38;5;13m@ /d|
000003e0  65 76 2f 66 64 2f 36 32  3a 32 20 40 1b 5b 30 6d  |ev/fd/62:2 @.[0m|
000003f0  1b 5b 30 6d 0a 20 61 0a  2b 62 0a 2b 63 0a 2b 64  |.[0m. a.+b.+c.+d|
00000400  0a                                                |.|
00000401

This only works fine (3 lines marked in green) for me when using diff-so-fancy as git diff tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions