Skip to content

Commit

Permalink
Add horizontal scroll support for windows (untested)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimonPost committed Jun 12, 2023
1 parent 8dde022 commit 0eecd30
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/event/sys/windows/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,15 @@ fn parse_mouse_event_record(
}
}
EventFlags::DoubleClick => None, // double click not supported by unix terminals
EventFlags::MouseHwheeled => None, // horizontal scroll not supported by unix terminals
EventFlags::MouseHwheeled => {
if button_state.scroll_left() {
Some(MouseEventKind::ScrollLeft)
} else if button_state.scroll_right() {
Some(MouseEventKind::ScrollRight)
} else {

Check failure on line 366 in src/event/sys/windows/parse.rs

View workflow job for this annotation

GitHub Actions / stable on ubuntu-latest

Diff in /home/runner/work/crossterm/crossterm/src/event/sys/windows/parse.rs
None
}
},
_ => None,
};

Expand Down

0 comments on commit 0eecd30

Please sign in to comment.