If I do "git-diff" I get the output in what appears to be an instance of less that ignores scroll-wheel events If I do "git-diff | less" the wheel works like it normally does in less but I don't get the colours. If I do "git-diff --color | less -R" I get the desired behavior. I hope that helps.
[From my comment on the corresponding Ubuntu bug: <https://bugs.launchpad.net/bugs/326460>] 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. To work around this, you can disable both of those options by exporting LESS=RS. You will gain mouse wheel scrolling, but the disadvantage is that you will always have to explicitly quit the pager, even if it is displaying less than a screenfull. If you think the default should be changed, consider talking to the upstream developers: <http://vger.kernel.org/vger-lists.html#git>. Anders
found 565699 git-core/1:1.7.0-1 tags 565699 + upstream severity 565699 wishlist thanks Anders Kaseorg wrote: Thanks Anders, that makes a lot of sense. I should also mention that -X can be useful even without -F, to keep the last displayed part of a log visible on the terminal for cutting and pasting into later commands. So different people would probably want it different ways. On the interaction of -F and -X you described, see <http://bugs.debian.org/51462>. It is not my itch, but I could imagine less providing another option to get the best of both worlds by buffering until it gets a screen’s worth, EOF, or a certain amount of time passes, or something like that. For git, the bug here is that in terminals that support scrolling with a wheel without -X, git is disabling that. I think a good default _might_ be to use -RS for such terminals and -FRSX for others. This requires a way to detect terminals that support scrolling in ‘less’ with a wheel (xterm doesn’t AFAICT), so it might be hard to implement. Hope that helps, Jonathan
xterm does support the feature (vim uses it for instance, on cygwin). But 'less' doesn't seem to.
xterm does support the feature (vim uses it for instance, on cygwin). But 'less' doesn't seem to.