1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00

Implement mouse scrolling with line deltas

This makes scrolling work for mouse wheels (was previously just
trackpads).
This commit is contained in:
Joe Wilm 2016-12-11 20:00:00 -08:00
parent 4df29bb377
commit 3d26d3c68a

View file

@ -305,8 +305,16 @@ impl Processor {
terminal: &Term
) {
match delta {
MouseScrollDelta::LineDelta(_columns, _lines) => {
unimplemented!();
MouseScrollDelta::LineDelta(_columns, lines) => {
let code = if lines > 0.0 {
64
} else {
65
};
for _ in 0..(lines.abs() as usize) {
self.mouse_report(code, notifier, terminal);
}
},
MouseScrollDelta::PixelDelta(_x, y) => {
match phase {