From 07c17c9356ed2c7c9a5220a0cf72283212993d7d Mon Sep 17 00:00:00 2001 From: Garnet DeGelder Date: Thu, 19 Feb 2026 18:35:44 -0500 Subject: [PATCH 1/2] Add horizontal scrolling with mouse wheel --- crates/edit/src/input.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/edit/src/input.rs b/crates/edit/src/input.rs index bff72fc9b8a..a0445d3c527 100644 --- a/crates/edit/src/input.rs +++ b/crates/edit/src/input.rs @@ -444,7 +444,11 @@ impl<'input> Iterator for Stream<'_, '_, 'input> { mouse.state = InputMouseState::None; if (btn & 0x40) != 0 { mouse.state = InputMouseState::Scroll; - mouse.scroll.y += if (btn & 0x01) != 0 { 3 } else { -3 }; + if (btn & 0x06) != 0 { + mouse.scroll.x += if (btn & 0x01) != 0 { 7 } else { -7 }; + } else { + mouse.scroll.y += if (btn & 0x01) != 0 { 3 } else { -3 }; + } } else if csi.final_byte == 'M' { const STATES: [InputMouseState; 4] = [ InputMouseState::Left, From 900787d7914135c98a3d2afe1f579bfa17f684b4 Mon Sep 17 00:00:00 2001 From: Garnet DeGelder Date: Tue, 3 Mar 2026 17:25:24 -0500 Subject: [PATCH 2/2] Allow speeding up mouse wheel scrolling by holding down the alt key --- crates/edit/src/input.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/edit/src/input.rs b/crates/edit/src/input.rs index a0445d3c527..0b956623bc0 100644 --- a/crates/edit/src/input.rs +++ b/crates/edit/src/input.rs @@ -444,10 +444,11 @@ impl<'input> Iterator for Stream<'_, '_, 'input> { mouse.state = InputMouseState::None; if (btn & 0x40) != 0 { mouse.state = InputMouseState::Scroll; + let scroll_mult = if (btn & 0x08) != 0 { 5 } else { 1 }; if (btn & 0x06) != 0 { - mouse.scroll.x += if (btn & 0x01) != 0 { 7 } else { -7 }; + mouse.scroll.x += if (btn & 0x01) != 0 { 7 } else { -7 } * scroll_mult; } else { - mouse.scroll.y += if (btn & 0x01) != 0 { 3 } else { -3 }; + mouse.scroll.y += if (btn & 0x01) != 0 { 3 } else { -3 } * scroll_mult; } } else if csi.final_byte == 'M' { const STATES: [InputMouseState; 4] = [