Add support for horizontal scroll wheel. (Bjorn Winckler)
diff --git a/src/vim.h b/src/vim.h
index 6790a48..38bd0ef 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1721,12 +1721,18 @@
# define MOUSE_CTRL 0x10
/* mouse buttons that are handled like a key press (GUI only) */
+/* Note that the scroll wheel keys are inverted: MOUSE_5 scrolls lines up but
+ * the result of this is that the window moves down, similarly MOUSE_6 scrolls
+ * columns left but the window moves right. */
# define MOUSE_4 0x100 /* scroll wheel down */
# define MOUSE_5 0x200 /* scroll wheel up */
# define MOUSE_X1 0x300 /* Mouse-button X1 (6th) */
# define MOUSE_X2 0x400 /* Mouse-button X2 */
+# define MOUSE_6 0x500 /* scroll wheel left */
+# define MOUSE_7 0x600 /* scroll wheel right */
+
/* 0x20 is reserved by xterm */
# define MOUSE_DRAG_XTERM 0x40
@@ -2180,4 +2186,10 @@
#define BFA_WIPE 2 /* buffer is going to be wiped out */
#define BFA_KEEP_UNDO 4 /* do not free undo information */
+/* direction for nv_mousescroll() and ins_mousescroll() */
+#define MSCR_DOWN 0 /* DOWN must be FALSE */
+#define MSCR_UP 1
+#define MSCR_LEFT -1
+#define MSCR_RIGHT -2
+
#endif /* VIM__H */