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

Line numbers and side-by-side mode #748

Merged
merged 2 commits into from Oct 26, 2021

Conversation

th1000s
Copy link
Contributor

@th1000s th1000s commented Oct 26, 2021

As it turns out, line numbers CAN be disabled in side-by-side mode via the git config delta.line-numbers=false (I noticed the env var GIT_CONFIG_PARAMETERS way too late). So take that into consideration, also blame more of the strangeness on UseFullPanelWidth.

Additionally the spuriously incremented line numbers are fixed.

Even though this feature enables line numbers, these can be disabled via
the git config `delta.line-numbers=false`. So always enable line numbers,
even if they do not print numbers.

Construct more structs with ..Self::default()
@dandavison
Copy link
Owner

Do you think this should be included in the next release, or does it not make user-facing changes because the assertion was a debug_assert?

@th1000s
Copy link
Contributor Author

th1000s commented Oct 26, 2021

It also fixes a small layout bug in the side-by-side-without-line-numbers setup: In the right panel zero lines were 1 column shorter than diff lines. But I don't think anybody explicitly disables line numbers there, it's more for completeness.

@dandavison dandavison merged commit 59e8908 into dandavison:master Oct 26, 2021
Copy link
Owner

@dandavison dandavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants