Skip to content

Conversation

@KaKi87
Copy link

@KaKi87 KaKi87 commented May 29, 2024

@keith-hall
Copy link
Collaborator

Probably it could be worth mentioning this at https://github.com/sharkdp/bat?tab=readme-ov-file#using-less-as-a-pager

@KaKi87
Copy link
Author

KaKi87 commented Jun 27, 2024

Hello,
Any news on this ?
Thanks

@Enselic
Copy link
Collaborator

Enselic commented Aug 15, 2025

this is a minefield, we fix a bug for someone we introduce a bug for someone else

can we write a regression test for your use case_ that we will at least not break it in the future if this turns out to be problematic and we found other solutions

I don't fully understand the problem, it would be helpful if you could elaborate

@KaKi87
Copy link
Author

KaKi87 commented Aug 15, 2025

we fix a bug for someone we introduce a bug for someone else

What bugs are you referring to ?

can we write a regression test for your use case_ that we will at least not break it in the future if this turns out to be problematic and we found other solutions

Sure.

I don't fully understand the problem, it would be helpful if you could elaborate

I provided an explanation with an attached GIF there : #2912 (comment)

@Enselic
Copy link
Collaborator

Enselic commented Aug 22, 2025

I'm not referring to specific bugs but to the risk of introducing bugs by changing behavior.

But if we (with "we" I really mean "you" ;) add a regression test for this case, that's fine. Then it's up to those who depend on the current behavior to fix any follow-up bugs and write regression tests for their uses cases.

I can reproduce the problem with this btw:

  1. seq 1 200 | tr '\n' ' ' | bat --wrap=never
  2. Scroll around

Expected result:
The line is always at the top of the terminal.

Actual result:
The line starts at the bottom and jumps to the top, as in your GIF.

@Enselic Enselic added the waiting-on-author Progress on this PR is blocked mostly because we are waiting on the author of the PR to do something label Aug 22, 2025
@KaKi87
Copy link
Author

KaKi87 commented Aug 22, 2025

(with "we" I really mean "you" ;)

Oh 😅 I don't how to do that lol

I don't do Rust, but even if I did or if this was a JS project (that's the one language I'm fluent at), I actually don't see how this could be checked, as it's not just manipulating strings, but checking scroll (and text-based scroll sounds even harder than web scroll) ?

@Enselic
Copy link
Collaborator

Enselic commented Aug 25, 2025

For the record, if you are comfortable to merge this without a regression test @keith-hall, that's fine with me! (I noticed your PR Approval still stands.)

@Enselic Enselic added the needs-test This needs a regression test. label Aug 28, 2025
@Enselic
Copy link
Collaborator

Enselic commented Sep 27, 2025

Closing for now to keep PR inbox clean but am of course happy to re-open if you get around writing a test.

@Enselic Enselic closed this Sep 27, 2025
@KaKi87
Copy link
Author

KaKi87 commented Sep 27, 2025

Well, you pinged someone about merging this without a test, and they never responded 😭

Plus, I also said I wouldn't know how to do that 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-test This needs a regression test. waiting-on-author Progress on this PR is blocked mostly because we are waiting on the author of the PR to do something

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants