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

version graph

Package: git; Maintainer for git is Jonathan Nieder <jrnieder@gmail.com>; Source for git is src:git (PTS, buildd, popcon).

Reported by: jasen <jasen@nikita.treshna.com>

Date: Mon, 18 Jan 2010 00:48:01 UTC

Severity: wishlist

Tags: upstream

Found in versions git/1:1.7.0-1, git/1:1.7.1-1, git/1:1.5.6.5-3+lenny1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#565699; Package git-core. (Mon, 18 Jan 2010 00:48:04 GMT) (full text, mbox, link).


Acknowledgement sent to jasen <jasen@nikita.treshna.com>:
New Bug report received and forwarded. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 18 Jan 2010 00:48:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: jasen <jasen@nikita.treshna.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: /usr/bin/git-diff: pager ignores mouse wheel
Date: Mon, 18 Jan 2010 13:35:26 +1300
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-18            GNU C Library: Shared libraries
ii  libcurl3-gnutls        7.18.2-8lenny2    Multi-protocol file transfer libra
ii  libdigest-sha1-perl    2.11-2+b1         NIST SHA-1 message digest algorith
ii  liberror-perl          0.17-1            Perl 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-5    Apply a diff file to an original
ii  rsync                         3.0.3-2    fast 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-run        <none>             (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  gitweb                <none>             (no description available)

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#565699; Package git-core. (Tue, 26 Jan 2010 20:30:06 GMT) (full text, mbox, link).


Acknowledgement sent to Anders Kaseorg <andersk@MIT.EDU>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Tue, 26 Jan 2010 20:30:06 GMT) (full text, mbox, link).


Message #10 received at 565699@bugs.debian.org (full text, mbox, reply):

From: Anders Kaseorg <andersk@MIT.EDU>
To: jasen <jasen@nikita.treshna.com>, 565699@bugs.debian.org
Subject: Re: Bug#565699: /usr/bin/git-diff: pager ignores mouse wheel
Date: Tue, 26 Jan 2010 15:27:09 -0500 (EST)
[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




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#565699; Package git-core. (Mon, 22 Feb 2010 08:18:02 GMT) (full text, mbox, link).


Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 22 Feb 2010 08:18:03 GMT) (full text, mbox, link).


Message #15 received at 565699@bugs.debian.org (full text, mbox, reply):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Anders Kaseorg <andersk@MIT.EDU>, control@bugs.debian.org
Cc: jasen <jasen@nikita.treshna.com>, 565699@bugs.debian.org
Subject: Re: /usr/bin/git-diff: pager ignores mouse wheel
Date: Mon, 22 Feb 2010 02:16:32 -0600
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




Bug Marked as found in versions git-core/1:1.7.0-1. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Mon, 22 Feb 2010 08:18:06 GMT) (full text, mbox, link).


Added tag(s) upstream. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Mon, 22 Feb 2010 08:18:07 GMT) (full text, mbox, link).


Severity set to 'wishlist' from 'minor' Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Mon, 22 Feb 2010 08:18:07 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#565699; Package git-core. (Mon, 22 Feb 2010 23:15:03 GMT) (full text, mbox, link).


Acknowledgement sent to dickey@his.com:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 22 Feb 2010 23:15:03 GMT) (full text, mbox, link).


Message #26 received at 565699@bugs.debian.org (full text, mbox, reply):

From: Thomas Dickey <dickey@his.com>
To: 565699@bugs.debian.org
Cc: 565699-submitter@bugs.debian.org
Subject: re: #565699 /usr/bin/git-diff: pager ignores mouse wheel
Date: Mon, 22 Feb 2010 18:13:03 -0500
[Message part 1 (text/plain, inline)]
>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.

xterm does support the feature (vim uses it for instance, on cygwin).
But 'less' doesn't seem to.

-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
[signature.asc (application/pgp-signature, inline)]

Message sent on to jasen <jasen@nikita.treshna.com>:
Bug#565699. (Mon, 22 Feb 2010 23:15:07 GMT) (full text, mbox, link).


Bug reassigned from package 'git-core' to 'git'. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sat, 15 May 2010 21:21:25 GMT) (full text, mbox, link).


Bug No longer marked as found in versions git-core/1:1.7.0-1 and git-core/1:1.5.6.5-3+lenny1. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sat, 15 May 2010 21:21:25 GMT) (full text, mbox, link).


Bug Marked as found in versions git/1:1.7.0-1. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sat, 15 May 2010 21:21:26 GMT) (full text, mbox, link).


Bug Marked as found in versions git/1:1.5.6.5-3+lenny1. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sat, 15 May 2010 21:21:27 GMT) (full text, mbox, link).


Bug Marked as found in versions git/1:1.7.1-1. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sat, 15 May 2010 21:21:27 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Feb 5 06:32:33 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.