diff --git a/tui/src/floating_text.rs b/tui/src/floating_text.rs index 12e0e197..bb1c9744 100644 --- a/tui/src/floating_text.rs +++ b/tui/src/floating_text.rs @@ -268,6 +268,8 @@ impl FloatContent for FloatingText { match event.kind { MouseEventKind::ScrollDown => self.scroll_down(), MouseEventKind::ScrollUp => self.scroll_up(), + MouseEventKind::ScrollLeft => self.scroll_left(), + MouseEventKind::ScrollRight => self.scroll_right(), _ => {} } false diff --git a/tui/src/state.rs b/tui/src/state.rs index b5ff9377..b7934feb 100644 --- a/tui/src/state.rs +++ b/tui/src/state.rs @@ -424,18 +424,24 @@ impl AppState { match &mut self.focus { Focus::TabList => match event.kind { MouseEventKind::ScrollDown => { - self.current_tab.select_next(); + if self.current_tab.selected().unwrap() != self.tabs.len() - 1 { + self.current_tab.select_next(); + } self.refresh_tab(); } MouseEventKind::ScrollUp => { - self.current_tab.select_next(); + if self.current_tab.selected().unwrap() != 0 { + self.current_tab.select_previous(); + } self.refresh_tab(); } + MouseEventKind::ScrollRight => self.focus = Focus::List, _ => {} }, Focus::List => match event.kind { MouseEventKind::ScrollDown => self.selection.select_next(), MouseEventKind::ScrollUp => self.selection.select_previous(), + MouseEventKind::ScrollLeft => self.focus = Focus::TabList, _ => {} }, Focus::FloatingWindow(float) => {