Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Incorrectly highlighting removed characters #175

Closed
boris-petrov opened this issue May 3, 2020 · 2 comments
Closed

馃悰 Incorrectly highlighting removed characters #175

boris-petrov opened this issue May 3, 2020 · 2 comments

Comments

@boris-petrov
Copy link

a.txt:

private final Foo foo = com.company.a.b.c.d.Company.getFoo();

b.txt:

private final Foo foo = Company.getFoo();
diff -u a.txt b.txt | delta

Not sure how to give you "raw" output but if you try it out you'll see that the removed com.company.a.b.c.d. part of the first file is not highlighted. Interestingly enough, if you remove a.b.c.d., then it works fine.

@dandavison
Copy link
Owner

Hi @boris-petrov, thanks for the issues you've opened! (Sorry for the slow reply, I have limited time this week but they are very useful to have.)

So this one, I think, is similar to #140 . We can achieve the expected highlighting by tweaking --max-line-distance. Basically, I agree with you, another iteration is needed on the details of this feature. There are a few considerations -- please see #140 for full discussion of the current state.

$ diff -u a b | delta --max-line-distance=0.6
image

@boris-petrov
Copy link
Author

@dandavison - thank you for the support! No worries, you answer when you have the time! I'll close this issue as a duplicate then. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants