From f21cd9ec19337f59418c0a933ec8f0cf04beb992 Mon Sep 17 00:00:00 2001 From: boxdot Date: Thu, 21 Dec 2023 15:30:34 +0100 Subject: [PATCH] fix: channel selection per mouse when list is scrolled --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index a3335b9..85966cb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -279,7 +279,7 @@ async fn run_single_threaded(relink: bool) -> anyhow::Result<()> { let row = event.row; if let Some(channel_idx) = ui::coords_within_channels_view(terminal.get_frame().size(), col, row) - .map(|(_, row)| row as usize) + .map(|(_, row)| usize::from(row) + app.channels.state.offset()) .filter(|&idx| idx < app.channels.items.len()) { app.channels.state.select(Some(channel_idx));