Bug#565699: /usr/bin/git-diff: pager ignores mouse wheel

2010-02-22 Thread Jonathan Nieder
found 565699 git-core/1:1.7.0-1
tags 565699 + upstream
severity 565699 wishlist
thanks

Anders Kaseorg wrote:

 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.

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



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#565699: /usr/bin/git-diff: pager ignores mouse wheel

2010-01-26 Thread Anders Kaseorg
[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



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#565699: /usr/bin/git-diff: pager ignores mouse wheel

2010-01-17 Thread jasen
Package: git-core
Version: 1:1.5.6.5-3+lenny1
Severity: minor
File: /usr/bin/git


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.

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26.2 (SMP w/3 CPU cores)
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages git-core depends on:
ii  libc6  2.7-18GNU C Library: Shared libraries
ii  libcurl3-gnutls7.18.2-8lenny2Multi-protocol file transfer libra
ii  libdigest-sha1-perl2.11-2+b1 NIST SHA-1 message digest algorith
ii  liberror-perl  0.17-1Perl module for error/exception ha
ii  libexpat1  2.0.1-4   XML parsing C library - runtime li
ii  perl-modules   5.10.0-19 Core Perl modules
ii  zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime

Versions of packages git-core recommends:
ii  less  418-1  Pager program similar to more
ii  openssh-client [ssh-client]   1:5.1p1-5  secure shell client, an rlogin/rsh
ii  patch 2.5.9-5Apply a diff file to an original
ii  rsync 3.0.3-2fast remote file copy program (lik

Versions of packages git-core suggests:
pn  git-arch  none (no description available)
pn  git-cvs   none (no description available)
pn  git-daemon-runnone (no description available)
pn  git-doc   none (no description available)
pn  git-email none (no description available)
pn  git-gui   none (no description available)
pn  git-svn   none (no description available)
ii  gitk  1:1.5.6.5-3+lenny2 fast, scalable, distributed revisi
pn  gitwebnone (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org