diff options
author | Michael Davis | 2023-08-22 14:49:22 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-08-22 20:17:17 +0000 |
commit | 050c019ccb4473e24f7e55cc941e7178db776fb8 (patch) | |
tree | 854f9d19b5fa60630dc4f97602d84ab5438cebf2 /helix-view | |
parent | e8fef6b6fc241ced0165199f0c36c6dd6e1c142e (diff) |
Translate new ScrollLeft/ScrollRight crossterm mouse events
Diffstat (limited to 'helix-view')
-rw-r--r-- | helix-view/src/input.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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<crossterm::event::MouseEventKind> 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, } } } |