Skip to content

Commit

Permalink
fix: channel selection per mouse when list is scrolled
Browse files Browse the repository at this point in the history
  • Loading branch information
boxdot committed Dec 21, 2023
1 parent 39c0b08 commit f21cd9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit f21cd9e

Please sign in to comment.