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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Unable to remove extra blank line preceding file and hunk headers #1944

Open
friederbluemle opened this issue Jan 23, 2025 · 1 comment

Comments

@friederbluemle
Copy link

It seems that delta always inserts a blank line before a file or hunk header.

Plain git diff

Image

delta

Image

Note the two blank lines marked with a red arrow before hunk headers and one blank line marked with a blue arrow before file header.

Is there a configuration to remove the empty lines? Especially when not using line numbers, the output can be very confusing (and unnecessarily verbose). There is no way to tell if the blank line is actually part of the source code, or inserted later on for formatting only purposes.

I tried using file-decoration-style = omit and hunk-header-decoration-style = omit but that also won't remove it.

@dandavison
Copy link
Owner

Hi @friederbluemle, I don't think there's an option for this yet, but we're open to design suggestions and PRs. (#1517 is a request for the same, maybe you could copy your screenshots there and we could unify the issues).

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