Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Patch to support horizontal mouse wheel
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bram Moolenaar  
View profile  
 More options Jul 21 2010, 3:36 pm
From: Bram Moolenaar <B...@Moolenaar.net>
Date: Wed, 21 Jul 2010 21:36:01 +0200
Local: Wed, Jul 21 2010 3:36 pm
Subject: Re: Patch to support horizontal mouse wheel

Björn wrote:
> >> Ok, here is the updated patch.  I've renamed the keys as follows:

> >> <ScrollWheelUp>
> >> <ScrollWheelDown>
> >> <ScrollWheelLeft>
> >> <ScrollWheelRight>

> >> These all scroll the _window_ in the direction indicated.  So if I
> >> push UP on my scroll wheel, the window moves up but the lines are
> >> actually scrolled down (this is the most intuitive way of thinking
> >> about scrolling in my opinion).  Similarly, dragging my finger to the
> >> LEFT on a laptop's trackpad scrolls the window to the left but the
> >> columns are actually scrolled right.

> > Looks good to me.  With the Ctrl+scrollwheel changes, I was able to test
> > this by mapping <C-ScrollWheel{Up|Down}> to <ScrollWheel{Left|Right}>
> > and it seems to work fine in both term and GTK2.

> > The only thing I might change would be the symmetry of using 3 for the
> > default increment.  Maybe 5 or 10 would be better for horizontal
> > scrolling?  (With the default, horizontal scrolling seems much slower
> > than vertical scrolling.)

> I increased the default number of lines to scroll to 6 -- any higher
> and it was difficult to just scroll "a little" (with my track pad).
> The docs have also been updated to reflect this.

> >> It is still possible to use <MouseUp> as a synonym for
> >> <ScrollWheelDown>, and to use <MouseDown> as a synonym for
> >> <ScrollWheelUp>.  I've updated all the help docs to reflect these
> >> changes.

> > The new list of the default keys seems very cluttered with the tags
> > listed all on one line.  The old layout also had the benefit of ':help
> > <S-MouseUp>', etc. jumping to exactly the right line.

> Sure, I tried changing it back and it seems a bit more readable that way.

> The attached patch contains these minor updates.

> Bram: could you indicate if there is any chance this is making it for
> 7.3 (or at all)?  It seems this feature would mostly be used by Mac
> users (since "all" Macs have horizontal scrolling abilities) and a few
> users have asked for this feature.  If you'd rather hold off merging
> this patch I'll merge it with the MacVim source code so that it gets
> tested properly and then you can take a look at it later.

It looks fairly good.  It's a bit big to include at the last moment,
but we still have some time for testing.

Can you change the argument for the direction to use an enum or #defined
value?  Using 0, 1, -1 and -2 is a bit confusing.

For style, instead of:

        if (val < 0) val = 0;

use:

        if (val < 0)
            val = 0;

gui_find_longest_lnum() is missing a prototype.

--
If cars evolved at the same rate as computers have, they'd cost five euro,
run for a year on a couple of liters of petrol, and explode once a day.

 /// Bram Moolenaar -- B...@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.