Hi,

Attached is a patch to add horizontal mouse wheel support.  It may
look like a big patch, but the only real change is inside
gui.c/normal.c/edit.c (and it is quite minor, I had to modify some
horizontal scrollbar code and that's about it).  It applies to the
latest vim73 changeset as of today (i.e. the one titled "Added
":earlier 1f" and ":later 1f".").

Currently only GTK is supported but I can't test it since I don't
actually have access to GTK -- I have only tested the patch in MacVim
(but that code is not included in this patch).  Please let me know if
there are any problems with GTK.

I only added GTK support since it was completely straightforward -- I
leave adding support for other GUIs to whoever is interested (it
should be very easy).

One comment regarding the code: since vertical movement uses <MouseUp>
and <MouseDown> I named the horizontal keys <MouseLeft> and
<MouseRight> but I realize that this can be kind of confusing since
e.g. <LeftMouse> is used for clicking the left mouse button.  Should I
change the names?  To what?

I'm not sure how common it is to have horizontal mouse wheels on PCs
-- but pretty much every Mac comes with some form of horizontal
scrolling (e.g. trackpads on MacBooks or the Apple Magic Mouse) so
this patch is at least useful for MacVim users.  (I'd be happy if this
makes it into 7.3 -- in any case I will add it to MacVim 7.3 when I
release that)

Björn

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Attachment: horz-mouse-wheel.tar.bz2
Description: BZip2 compressed data

Raspunde prin e-mail lui