1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-25 14:05:41 -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 terminal: &Term
) { ) {
match delta { match delta {
MouseScrollDelta::LineDelta(_columns, _lines) => { MouseScrollDelta::LineDelta(_columns, lines) => {
unimplemented!(); 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) => { MouseScrollDelta::PixelDelta(_x, y) => {
match phase { match phase {