From 0190f9b017b93c108fd2d83653f1751871cc8c25 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sat, 15 Dec 2012 04:33:20 +0100 Subject: In user lists, the upper line is now the upper most person. This means you cannot scroll too high. fix #2180 --- src/windows.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/windows.py b/src/windows.py index fae2e7bb..e8f4ce8f 100644 --- a/src/windows.py +++ b/src/windows.py @@ -239,8 +239,10 @@ class UserList(Win): y = 0 users = sorted(users) - if self.pos >= len(users) and self.pos != 0: - self.pos = len(users)-1 + if len(users) < self.height: + self.pos = 0 + elif self.pos >= len(users) - self.height and self.pos != 0: + self.pos = len(users) - self.height for user in users[self.pos:]: self.draw_role_affiliation(y, user) self.draw_status_chatstate(y, user) -- cgit v1.2.3