diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-22 00:12:53 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-22 00:12:53 +0300 |
| commit | a9ff4012bdca0dbdbc77bc6e53a430689fc899be (patch) | |
| tree | 6e20af3c9aa5383af4989ff5bc3830a2c58ee57f /src/app/input/selection.rs | |
| parent | 659badf106786f5611e750de0e4936e47c69a3d4 (diff) | |
feat: add configurable mouse scroll lines
refs #236
Diffstat (limited to 'src/app/input/selection.rs')
| -rw-r--r-- | src/app/input/selection.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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, } |
