Skip to content

Added first and last line of hunk is not highlighted #52

@fdcds

Description

@fdcds

In my test case I add lines x and y before and after a hunk a b c:

❯ cat a
a
b
c
❯ cat b
x
  a
  b
  c
y

delta detects that the spaces in front of a b c changed and highlights them, but does not highlight the first and last line of the hunk (x and y):

❯ diff -u a b | delta
[...junk...]
1
 a                                                                                                                                                                                                                                                                                                                                                                                                                                       
 b                                                                                                                                                                                                                                                                                                                                                                                                                                       
 c                                                                                                                                                                                                                                                                                                                                                                                                                                       
 x                                                                                                                                                                                                                                                                                                                                                                                                                                       
   a                                                                                                                                                                                                                                                                                                                                                                                                                                     
   b                                                                                                                                                                                                                                                                                                                                                                                                                                     
   c                                                                                                                                                                                                                                                                                                                                                                                                                                     
 y

Using delta 0.0.14.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions