After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 755187 - Reported mouse coordinate is off if scrolled back
Reported mouse coordinate is off if scrolled back
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
git master
Other Linux
: Normal minor
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-17 21:44 UTC by Egmont Koblinger
Modified: 2015-10-03 19:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Egmont Koblinger 2015-09-17 21:44:51 UTC
Produce some output (more than a screenful).

Start an app that handles mouse, but does not switch to alternate screen. One possibility is "vim some_existing_file" with this .vimrc:
set mouse=a
set ttym=xterm
set t_ti= t_te=

Scroll back by a few lines using Ctrl+Shift+Up.

Click somewhere. Notice that the cursor is not moved to the location where you clicked.

The mouse escape sequence that vte sends is computed from the coordinates of the pointer within the widget; ignoring scroll_delta.

xterm, urxvt and putty first scroll the scrollbar to the very bottom so that this problem can't arise at all.

iTerm2 takes scroll_delta into account, and if you click inside the scrollback area (rather than on the area occupied by vim) then it does what it'd do if mouse mode wasn't enabled.

konsole also takes scroll_delta into account, and does nothing if you click outside of vim's area.
Comment 1 Christian Persch 2015-09-26 18:05:54 UTC
IMO iterm and konsole have it right here.

We do have the 'scroll to bottom on keystroke' pref, so certainly could add a 'scroll to bottom on mouse event if in mouse tracking mode' pref too, but I don't think it's necessary.
Comment 2 Egmont Koblinger 2015-10-03 19:29:44 UTC
Quick fix submitted as ac3438c. Will be reworked for smooth scrolling anyways.

Do nothing if the click occurs outside of the normal area. This wasy the simplest solution.

I really don't want to have any prefs for this, it's such a rare corner case.