bat doesn't recognize scrolling from iTerm2

Created on 14 Jul 2018  路  4Comments  路  Source: sharkdp/bat

In iTerm2 is it possible to use scroll using wheel in less and other programs such as man. But bat unresponsive to scrolling.

Is it possible to add support for it too?

help wanted question

Most helpful comment

Actually, I can reproduce this on Linux as well.

The problem is the --no-init option that we pass to less. For more details, see this ticket and the following excerpt from this thread:

git exports LESS=FRSX if the LESS environment variable is not already
set. The -X (--no-init) is required to let -F (--quit-if-one-screen)
work sensibly, but breaks mouse wheel scrolling.

Once #158 is implemented, every user should be able to configure this separately and choose between (1) scrolling support (2) quit-if-one-screen behavior (3) a different pager that potentially supports both at once.

Given these new findings, I'd like to close this ticket and refer you to #158. Feel free to comment here, if you feel otherwise.

All 4 comments

This is weird because bat uses less. Maybe there is a command-line option for less that is required?

I'm not familiar with macOS, so any help would be appreciated.

No, just less. No options. Scrolling also works in vim.

Actually, I can reproduce this on Linux as well.

The problem is the --no-init option that we pass to less. For more details, see this ticket and the following excerpt from this thread:

git exports LESS=FRSX if the LESS environment variable is not already
set. The -X (--no-init) is required to let -F (--quit-if-one-screen)
work sensibly, but breaks mouse wheel scrolling.

Once #158 is implemented, every user should be able to configure this separately and choose between (1) scrolling support (2) quit-if-one-screen behavior (3) a different pager that potentially supports both at once.

Given these new findings, I'd like to close this ticket and refer you to #158. Feel free to comment here, if you feel otherwise.

This is now explained in this README section: https://github.com/sharkdp/bat#using-a-different-pager

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rien333 picture rien333  路  3Comments

jkaan picture jkaan  路  3Comments

yannallain picture yannallain  路  3Comments

x70b1 picture x70b1  路  3Comments

yum-feng picture yum-feng  路  3Comments