From a9ff4012bdca0dbdbc77bc6e53a430689fc899be Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Fri, 22 May 2026 00:12:53 +0300 Subject: feat: add configurable mouse scroll lines refs #236 --- src/app/input/selection.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/app/input/selection.rs') diff --git a/src/app/input/selection.rs b/src/app/input/selection.rs index 06de30b5..0ccb5506 100644 --- a/src/app/input/selection.rs +++ b/src/app/input/selection.rs @@ -144,7 +144,7 @@ impl AppState { terminal_runtimes: &TerminalRuntimeRegistry, mouse: MouseEvent, ) -> bool { - const LINES_PER_NOTCH: usize = 3; + let lines_per_notch = self.mouse_scroll_lines; let Some(selection) = self.selection.as_ref() else { return false; @@ -156,10 +156,10 @@ impl AppState { self.focus_pane(pane_id); match mouse.kind { MouseEventKind::ScrollUp => { - self.scroll_pane_up(terminal_runtimes, pane_id, LINES_PER_NOTCH) + self.scroll_pane_up(terminal_runtimes, pane_id, lines_per_notch) } MouseEventKind::ScrollDown => { - self.scroll_pane_down(terminal_runtimes, pane_id, LINES_PER_NOTCH) + self.scroll_pane_down(terminal_runtimes, pane_id, lines_per_notch) } _ => return false, } -- cgit v1.2.3