From 07c17c9356ed2c7c9a5220a0cf72283212993d7d Mon Sep 17 00:00:00 2001 From: Garnet DeGelder Date: Thu, 19 Feb 2026 18:35:44 -0500 Subject: [PATCH] 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,