Thunar compact list view doesn't scroll long file names into view on right-arrow / down-arrow keypress

Bug #1202389 reported by Forest
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Exo
Fix Released
Medium
exo (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I use Thunar in "Compact List" view. When the window is too small to display all the files in a directory, I press one of the arrow keys to select the next file beyond the bounds of the window. Thunar responds by moving the highlight to a file in the next column, and *normally* scrolls that column into view.

However, if any file name in the newly selected column is too long to fit within the window, Thunar doesn't scroll to that column at all. The newly selected file remains where it was, off the edge of the window. If it was positioned outside the window to begin with, it remains entirely invisible even after it is selected.

The problem seems to occur only when attempting to scroll right, using the right-arrow, down-arrow, or end keys. Scrolling left works fine.

This is especially easy to reproduce by navigating a small Thunar window to a directory full of many files, the last one with a very long file name, and pressing the End key.

I'm using Thunar 1.6.2-0ubuntu1 on Ubuntu 13.04 (raring).

Revision history for this message
In , Xfce-e (xfce-e) wrote :

I use Thunar in "Compact List" view. When the window is too small to display all the files in a directory, I press one of the arrow keys to select the next file beyond the bounds of the window. Thunar responds by moving the highlight to a file in the next column, and *normally* scrolls that column into view.

However, if any file name in the newly selected column is too long to fit within the window, Thunar doesn't scroll to that column at all. The newly selected file remains where it was, off the edge of the window. If it was positioned outside the window to begin with, it remains entirely invisible even after it is selected.

The problem seems to occur only when attempting to scroll right, using the right-arrow, down-arrow, or end keys. Scrolling left works fine.

This is especially easy to reproduce by navigating a small Thunar window to a directory full of many files, the last one with a very long file name, and pressing the End key.

Revision history for this message
In , Rad3k (trueradzian) wrote :

I can confirm this bug in Thunar 1.0.2 running on ArchLinux x86_64.

I tried looking into the code, but I've found that it exceeds my comprehension skills at the moment (not much practice with C and preprocessor wizardry, mainly C++).

Revision history for this message
In , Xfce-e (xfce-e) wrote :

This bug appears to have been introduced by the fix for bug 1683. (Perhaps this report should be against libexo instead of Thunar.)

Revision history for this message
In , Xfce-e (xfce-e) wrote :

Confirmed: The bug goes away when I revert this commit:
http://git.xfce.org/xfce/exo/commit/?id=c2ac2c77793a7fb6cee85160e6a0f00e53d02108

Revision history for this message
In , Xfce-e (xfce-e) wrote :

I don't understand what behavior bug 1683 was trying to describe, and the screen shots linked to that report no longer exist. I followed the steps in that report, and the only weirdness I noticed was that the icon view alternated between showing the beginning and the end of a long file name when selected. If that is what the offending commit was supposed to fix, I suggest reverting it, because the bug it causes (preventing a selected item from scrolling into view) is much worse.

Forest (foresto)
no longer affects: thunar
no longer affects: thunar (Ubuntu)
Revision history for this message
In , Xfce-e (xfce-e) wrote :

I made a patch that replaces the original bug 1683 fix with one that's a bit less drastic, in that it doesn't completely disable scrolling wide items into view. My patch takes care not to scroll if the selected item is already as visible as possible, thus avoiding the alternate left/right scrolling on multiple clicks that interfered with double-clicking wide items when I reverted the first patch.

I'm currently waiting for Launchpad's servers to build me a new package. If it works as expected, I'll upload my patch here.

Revision history for this message
In , Xfce-e (xfce-e) wrote :

Created attachment 5097
Skip horizontal scrolling to a wide item only if the item is already as visible as possible.

This patch allows wide items to scroll into view when selected, but does not cause them to alternately jump left and right with each click when they are already visible, and does not defeat double-click.

Revision history for this message
Forest (foresto) wrote :

Here's my patch. It allows wide items to scroll into view when selected, but does not cause them to alternately jump left and right with each click when they are already visible, and does not defeat double-click.

tags: added: patch
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Skip horizontal scrolling to a wide item only if the item is already as visible as possible." seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

Forest (foresto)
tags: added: saucy
Revision history for this message
In , Xfce-e (xfce-e) wrote :

Created attachment 5571
patch: scroll just enough to make a large item visible

Here's an updated patch against the Ubuntu Trusty libexo-1-0 package source.

Instead of failing to scroll at all when an item wider (or taller) than the view is selected, scroll just enough to make it as visible as possible. This allows large items to scroll into view when selected via arrow keys, but does not cause them to jump left and right with each click, and does not defeat double-click.

Revision history for this message
In , Xfce-e (xfce-e) wrote :

I believe this patch works cleanly against current git as well.

Revision history for this message
Forest (foresto) wrote :

This is still a problem in Trusty. I posted an updated patch to the upstream bug report. It is much smarter about scrolling items into view and applies cleanly to the Ubuntu trusty libexo-1-0 package. Hopefully launchpad will notice it.

tags: added: trusty
Changed in exo:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Forest (foresto) wrote :

Here's the updated patch, since Launchpad seems to have skipped it when importing comments from the upstream bug report.

Revision history for this message
In , Simon Steinbeiß (ochosi) wrote :

Just for reference, I can reproduce the bug. Maybe we can get this reviewed/merged before 4.12.

Revision history for this message
In , Xfce-e (xfce-e) wrote :

That would be nice.

Revision history for this message
In , Bluesabre-1 (bluesabre-1) wrote :

Able to reproduce the bug, and verified your patch as well. Committed at http://git.xfce.org/xfce/exo/commit/?id=9bb9c1688d9417ace0a94b87b512398d0f69429c

Thanks for the awesome patch!

Revision history for this message
In , Xfce-e (xfce-e) wrote :

Thanks for committing it. That's one less component I'll have to patch and repackage every time I upgrade my OS. :)

Changed in exo:
status: Confirmed → Fix Released
Revision history for this message
Sean Davis (bluesabre) wrote :

This bug was fixed in exo 0.10.3, included in Vivid.

Changed in exo (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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