From 7880f3389cc1bbc78eae071fe4dfe32e39903fe5 Mon Sep 17 00:00:00 2001 From: Joscha Date: Mon, 27 Jun 2022 09:30:51 +0200 Subject: [PATCH] Fix scroll offset calculation --- src/ui/rooms.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/rooms.rs b/src/ui/rooms.rs index 43c0b1b..98a51f9 100644 --- a/src/ui/rooms.rs +++ b/src/ui/rooms.rs @@ -82,8 +82,8 @@ impl Rooms { // height - len + index <= line .max(height - rooms.len() as i32 + cursor.index as i32) // Make sure there is no free space above the room list: - // line <= len - .min(rooms.len() as i32); + // line <= index + .min(cursor.index as i32); } }