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

Option to center view on line passed to --highlight-line #2363

Open
Jlll1 opened this issue Oct 8, 2022 · 1 comment
Open

Option to center view on line passed to --highlight-line #2363

Jlll1 opened this issue Oct 8, 2022 · 1 comment
Labels
feature-request New feature or request

Comments

@Jlll1
Copy link

Jlll1 commented Oct 8, 2022

Currently, when you highlight a line that's beyond the initial range of displayed lines, you need to scroll down to see it. This means that tools that use bat to display search results need to implement additional logic to center the view on the highlighted line. It would be nice to have an option to automatically center the view on the line specified in --highlight-line.

@Jlll1 Jlll1 added the feature-request New feature or request label Oct 8, 2022
@keith-hall
Copy link
Collaborator

This would require bat to know how to tell whatever pager you are using to scroll. I'm not sure we want to go down that rabbit hole, but #1185 (comment) and #1053 may interest you. Potentially this could also be a use case for plugins (#2203)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants