-
Notifications
You must be signed in to change notification settings - Fork 402
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
🐛 width option is not honored in git config sections #264
Comments
Hi @Ryuta69, I think |
Thank you for your reply. I set width, however, it doesn't affect any size.
|
Thanks @Ryuta69. You're right, that's not working as intended. Can you use this as a workaround: [core]
pager = delta --width 100
[delta]
... You will see the background colors in the right panel extend to the full width, because they are painted by the terminal emulator: There is not currently a way to make the background colors terminate at the |
@dandavison |
@dandavison Is it fine with you? |
That would be great! I'll re-open this issue. I think the place to start would be looking at the call to Line 84 in c573382
Is it as simple as moving that call to before |
@dandavison I already fixed config.rs/main.rs to accept gitconfig value and refactor
I think it used to be called before
just IMO. I was not going to move, but if you think it would be simpler, I'll move. |
On further thought it seems that at a high level what we want is
So I think what I said above about moving Have you already looked into adding a unit test? If not, here's a start: #[test]
fn test_width_in_git_config_is_honored() {
let git_config_contents = b"
[delta]
width = 7
";
let git_config_path = "delta__test_width_in_git_config_is_honored.gitconfig";
let opt = integration_test_utils::make_options_from_args_and_git_config(
&[],
Some(git_config_contents),
Some(git_config_path),
);
assert_eq!(opt.computed.decorations_width, cli::Width::Fixed(7));
remove_file(git_config_path).unwrap();
} |
Great to hear that! Yes, I will. |
When side-by-side is on, it gets really wide.
It would be great if I could set max-column( sorry if there is already. I look for document and issues, but couldn't find.)
The text was updated successfully, but these errors were encountered: