Ticket #3764 (new defect)

Opened 8 years ago

Last modified 8 years ago

Viewer: mouse click scrolls twice

Reported by: egmont Owned by:
Priority: minor Milestone: Future Releases
Component: mcview Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

mcview:

Press PageUp or PageDown. The contents suddenly jump by an entire page, as expected.

Now click on the upper or lower third with the mouse. The contents scroll twice by half a page, with a short but noticeable and annoying delay in between. Also, depending on the parity of the window height, there may or may not be an overlapping line (e.g. the previous bottom line becoming the top), that is, the amount of scroll is 1 less than an entire page.

Expected: Mouse clicks should suddenly scroll by an entire page, just as the keyboard keys do.

Change History

comment:1 in reply to: ↑ description ; follow-up: ↓ 2 Changed 8 years ago by mooffie

Replying to egmont:

The contents scroll twice by half a page, with a short but noticeable and annoying delay in between. Also, depending on the parity of the window height [...]


Well, that's what the viewer's mouse callback was designed to do. It does mcview_move_down(height / 2) on both mouse down and mouse up. The more outrageous thing there is that vertical scrolling is only enabled if text wrapping is off (without the user knowing this).

It's your fault. You were supposed to rewrite the viewer ;-)

BTW, in case you investigate it further: I see that this callback asks to repeat the mouse down event. This is 100ms by default. It could be more comfortable to put "mouse_repeat_rate=1000" in ~/.config/mc/ini when testing.

(I haven't yet looked into your other ticket; it probably has to do with this repeating mechanism.)

Last edited 8 years ago by mooffie (previous) (diff)

comment:2 in reply to: ↑ 1 Changed 8 years ago by egmont

Replying to mooffie:

It's your fault. You were supposed to rewrite the viewer ;-)

:D

Do you see any reasonable explanation why releasing the mouse should scroll? I can't think of any. I guess scrolling only on mouse click and according to the repeat timer would be better.

Also I'm wondering if it would make more sense to set the default of the repeat rate to match the typical keyboard rate (e.g. on my system "xset q" reports "repeat rate: 33" which corresponds to 30.3ms delay, about the third of the current default mc value.

comment:3 Changed 8 years ago by egmont

The lack of vertical scrolling in nowrap mode can to some extent be explained by the need for horizontal scrolling.

Though it should still be possible to scroll vertically at least by clicking at the top and bottom, middle ninth of the screen. But maybe vertical scrolling is still more important and that's what should happen in the corner ninths.

Or, divide the canvas into four areas with diagonal lines (X-shaped) for the four directions.

Note: See TracTickets for help on using tickets.