Skip to content

Commit

Permalink
Translate new ScrollLeft/ScrollRight crossterm mouse events
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis authored and archseer committed Aug 22, 2023
1 parent e8fef6b commit 050c019
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions helix-view/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
}
}
}
Expand Down

0 comments on commit 050c019

Please sign in to comment.