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?
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
Most helpful comment
Actually, I can reproduce this on Linux as well.
The problem is the
--no-initoption that we pass toless. For more details, see this ticket and the following excerpt from this thread: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.