-
Notifications
You must be signed in to change notification settings - Fork 398
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning highlight for trailing whitespace #137
Comments
Hi @herbygillot, this is a good call, thanks! Notes to help implementing a fix / unit tests for this: Here's an example
which but with delta this is |
By reading the documentation, I was expecting that forcing something like
Unfortunately, it also does not work. |
Hi @aureliojargas, let me give a quick response where I may be missing something: I actually thought that this was fixed and that I'd forgotten to close the issue. Which delta version are you using? With 0.3.0 this is what I get using the diff pasted above. Is this what you want the output to be? |
Hi @dandavison, thanks for the super quick answer! From what I can tell, it seems it is working correctly for lines containing only whitespace (as in your test), but not for lines with content and trailing whitespace. I'm using delta 0.3.0 in macOS 10.13.6. Considering a text file
Note that the plain git diff marks both cases as red, while delta does it only in the empty line: Please tell me if you need additional tests or information from my side, I'm glad to help. |
Thanks @aureliojargas that’s very helpful. I should be able to get a fix in shortly. |
It's been a week that I've been enjoying delta and I just arrived to this issue too 😅 hence curious about updates on the issue as well. |
Yeah, this is a really missing feature from standard git diff output to highlight trailing white-spaces. |
@dvoytik sorry I missed your offer of help here. There's discussion in #1037 and @amtoine has offered to work on this. What I'm hoping to do is first get some tests that demonstrate exactly what we're trying to fix. Once we have those tests let's check that we're all in agreement about what the behavior should be. |
@dvoytik @aureliojargas @herbygillot if you are able to test the branch #1037 to see whether it behaves as you would want w.r.t. whitespace changes that would be fantastic. The work in that branch has been done by @wescande. |
@dandavison I'm sorry for the late response, but I just installed delta 0.16.5 and I confirm this is now working. Thank you! |
The standard pager for git will highlight additions of lines whose only content are spaces or tabs in red. The same for any trailing whitespace. Is it possible to have similar behavior in delta?
Thanks in advance.
The text was updated successfully, but these errors were encountered: