Mouse scrolling does not work in vim, mutt etc.

Bug #291184 reported by Matthias Rosenkranz
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Gnome Virtual Terminal Emulator
Invalid
Medium
Terminator
Fix Released
Undecided
Jordan Callicoat
terminator (Ubuntu)
Fix Released
Undecided
Jordan Callicoat
vte (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: terminator

After today's upgrade to Intrepid from Hardy I cannot scroll with the mouse wheel anymore in vim or mutt sessions in terminator. Normal scrolling in the shell history works. Scrolling in mutt and vim works in a normal gnome-terminal but not in terminator. This is on amd64.

Revision history for this message
Josh Mize (jgmize) wrote :

I noticed the same thing on a fresh install of Intrepid on i386. Mouse wheel scrolling works for command line history, but not for vim, screen, man, etc. I tried installing Terminator from trunk (rev 576), and saw the same behaviour.

Revision history for this message
Josh Mize (jgmize) wrote :

Scratch that for vim, it works after I installed vim-python and "set mouse=a". :)

I believe that the other applications are the result of vte no longer sending arrow up/down keypresses when using a mouse wheel, since those applications do not actually have mouse wheel support built-in. This is apparently called "alternate screen scroll" and the following bug report for vte has a patch for vte and gnome-terminal that makes the feature toggleable:

http://bugzilla.gnome.org/show_bug.cgi?id=518405

This patch appears to have been accepted into vte for intrepid, per:

https://bugs.launchpad.net/ubuntu/+source/vte/+bug/106995

Revision history for this message
Matthias Rosenkranz (rose) wrote :

So the problem seems to be that terminator does not have this patch included because even if I enable "alternate screen scroll" in gnome-terminal and tell terminator to use this profile, it doesn't scroll in mutt (vim works with "set mouse=a", thank you!).

Revision history for this message
Donjan Rodic (bryonak) wrote :

Just confirming on Intrepid 64bit.

Scrolling via mouse is quite convenient, so here's another request for fixing this ;)

Revision history for this message
Chris Jones (cmsj) wrote :

It's interesting that you are seeing different behaviours in Terminator and GNOME Terminal - we use the exact same vte widget they do.
Could you definitely confirm that the same shell/vim configs work in one and not in the other? Also are you using screen in either/both? That tends to confuse scrolling.

Changed in terminator:
status: New → Incomplete
Revision history for this message
Matthias Rosenkranz (rose) wrote :

To confirm I started a new gnome-terminal and excuted mutt and vim. Even without "set mouse=a" in vimrc I can scroll in both applications (left mouse button doesn't work so direct mouse support in vim is really turned off). I then start terminator from the same gnome-terminal and both mutt and vim do not scroll anymore. Same configs in both, shell is bash, $TERM is set to the same value (xterm). I don't use screen in either terminal.

Revision history for this message
Donjan Rodic (bryonak) wrote :

Confirming a bit more elaborately...

Typing 'man man' in gnome-terminal lets me scroll up and down with the mouse wheel, not so in Terminator.

Scrolling the normal terminal history works fine in Terminator... If I enable the scrollbar, the slider becomes smaller the longer my history/output gets. But in less (man), the slider takes up the whole height and doesn't move.

I've tried changing the conf options without success (current config file attached).

Revision history for this message
Volans (volans) wrote :

I can confirm this bug on:

OS: Ubuntu 8.10 Intrepid Ibex 64bit
Kernel: 2.6.27-9-generic
Terminator version: 0.12 (bzr revision 628)
Gnome-terminal version: GNOME gnome-terminal 2.24.1.1

The mouse scroll doesn't work on Terminator's man, less, etc... while works well on gnome-terminal and in standard output.
The terminator -d output doesn't write anything while trying to scroll on man, etc...

Chris Jones (cmsj)
Changed in terminator:
milestone: none → 0.12
Chris Jones (cmsj)
Changed in terminator:
status: Incomplete → Confirmed
status: New → Confirmed
Revision history for this message
Jordan Callicoat (monkeesage) wrote :

confirmed on Ubuntu 9.04 (Jaunty) with current terminator head (r710) and python-vte 0.20.0-0ubuntu1.

I wonder how Gnome-Terminal handles this? You could listen for "scroll_event" on the VTE widget, then emit an Up / Down (or Page_Up / Page_Down) key_press_event on it...but you'd have to have a way to decide between doing that or doing the standard behavior of scrolling the buffer / scrollbar.

Revision history for this message
Jordan Callicoat (monkeesage) wrote :

NM. Didn't read through the bugzilla report in link above. Seems that alternate_screen_scroll isn't exposed through the python bindings though.

Revision history for this message
Jordan Callicoat (monkeesage) wrote :

I rebuilt the Ubuntu python-vte bindings with a definition for the set_alternate_screen_scroll method. Using the rebuilt module, calling set_alternate_screen_scroll (True) gets the correct behavior. Ubuntu VTE bug filed: LP #348708 (patch attached).

Revision history for this message
Jordan Callicoat (monkeesage) wrote :

Assuming the VTE patch is accepted, here is a patch against r710 to implement the option in Terminator.

Revision history for this message
Jordan Callicoat (monkeesage) wrote :
Revision history for this message
Chris Jones (cmsj) wrote :

Jordan: Thanks for the investigative work. I've pointed out your vte patch to Kees who uploaded the first vte patch and we'll see what can be done to get this into Jaunty before it's released.

Revision history for this message
Chris Jones (cmsj) wrote :

Thanks Jordan, I've pushed your patch into trunk, so if a fixed VTE makes it into jaunty then at least we will be able to take advantage of it there.

I would suggest posting your patch on the original GNOME bugzilla bug about this, alongside the patch that adds the alt scroll option.

Changed in terminator:
assignee: nobody → monkeesage
status: Confirmed → Fix Committed
Revision history for this message
Chris Jones (cmsj) wrote :

(I've set this to Fix Committed for Terminator, but obviously the fix won't become active until a suitable VTE is in use, but that is outside the scope of this project, so from our point of view it's as fixed as it can be).

Changed in vte:
status: New → Invalid
Revision history for this message
Jordan Callicoat (monkeesage) wrote :

> I would suggest posting your patch on the original GNOME bugzilla bug about this

Done.

Chris Jones (cmsj)
Changed in terminator (Ubuntu):
assignee: nobody → Jordan Callicoat (monkeesage)
status: Confirmed → Fix Released
Changed in terminator:
status: Fix Committed → Fix Released
Changed in vte (Ubuntu):
status: New → Triaged
Changed in vte:
importance: Undecided → Unknown
status: Invalid → Unknown
Changed in vte (Ubuntu):
importance: Undecided → Low
Revision history for this message
Matthias Rosenkranz (rose) wrote :

In Karmic mouse scrolling works in both terminator and gnome-terminal for me. Issue seems fixed.

Revision history for this message
Donjan Rodic (bryonak) wrote :

Same here, confirming FIXED in Karmic. Thanks!

Changed in vte:
status: Unknown → New
tags: added: patch-accepted-upstream
Changed in vte:
importance: Unknown → Medium
Changed in vte:
status: New → Invalid
Revision history for this message
Vlad Orlov (monsta) wrote :
Changed in vte (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.