From 050c019ccb4473e24f7e55cc941e7178db776fb8 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Tue, 22 Aug 2023 09:49:22 -0500 Subject: [PATCH] Translate new ScrollLeft/ScrollRight crossterm mouse events --- helix-view/src/input.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helix-view/src/input.rs b/helix-view/src/input.rs index 5566a265..87a0bfca 100644 --- a/helix-view/src/input.rs +++ b/helix-view/src/input.rs @@ -43,6 +43,10 @@ pub enum MouseEventKind { ScrollDown, /// Scrolled mouse wheel upwards (away from the user). ScrollUp, + /// Scrolled mouse wheel leftwards. + ScrollLeft, + /// Scrolled mouse wheel rightwards. + ScrollRight, } /// Represents a mouse button. @@ -458,6 +462,8 @@ impl From for MouseEventKind { crossterm::event::MouseEventKind::Moved => Self::Moved, crossterm::event::MouseEventKind::ScrollDown => Self::ScrollDown, crossterm::event::MouseEventKind::ScrollUp => Self::ScrollUp, + crossterm::event::MouseEventKind::ScrollLeft => Self::ScrollLeft, + crossterm::event::MouseEventKind::ScrollRight => Self::ScrollRight, } } }