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

Horizontal line wraps if less --status-column is used as pager #519

Closed
stroborobo opened this issue Mar 4, 2019 · 5 comments
Closed

Horizontal line wraps if less --status-column is used as pager #519

stroborobo opened this issue Mar 4, 2019 · 5 comments
Labels
question Further information is requested

Comments

@stroborobo
Copy link
Contributor

Hey @sharkdp,

I don't know why, but the horizontal lines bat draws are one char too long on my machine and wraps:

image

Appears to be this line:
https://github.com/sharkdp/bat/blob/9e11d66/src/printer.rs#L175

If I change the '1' to a '2', it's fine.

This is iTerm2 on the latest macOS and bat built from the current master (ecf147f).

@stroborobo
Copy link
Contributor Author

stroborobo commented Mar 5, 2019

Maybe actually it starts a char too late:

image

(Terminal.app in this case)

@stroborobo stroborobo changed the title Horizontal line one char too long Horizontal line wraps one char Mar 5, 2019
@stroborobo
Copy link
Contributor Author

Oh I understand now, it's the -J/--status-column switch in my $LESS env var. Unfortunately there's no --no-status-column to append to bat's pager call for an easy workaround. Personally I'd like it for the line to be 80 chars max so it doesn't wrap when resizing the terminal or adding split screens.

Thoughts?

@stroborobo stroborobo changed the title Horizontal line wraps one char Horizontal line wraps one char if less --status-column is used as pager Mar 5, 2019
@stroborobo stroborobo changed the title Horizontal line wraps one char if less --status-column is used as pager Horizontal line wraps if less --status-column is used as pager Mar 5, 2019
@stroborobo
Copy link
Contributor Author

Putting --terminal-width=-1 into my config is a good enough workaround for me.

Please close if this issue is out of bat's scope.

@sharkdp
Copy link
Owner

sharkdp commented Mar 5, 2019

Thank you for the feedback and for solving your own issue :-). See #376 for a related ticket with the same problem.

@sharkdp sharkdp added the question Further information is requested label Mar 5, 2019
@stroborobo
Copy link
Contributor Author

Oh, --wrap=never is a nice addition, too. Thank you! 💯

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

No branches or pull requests

2 participants