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); } }