In user lists, the upper line is now the upper most person.

This means you cannot scroll too high.
fix #2180
This commit is contained in:
Florent Le Coz 2012-12-15 04:33:20 +01:00
parent b23e7751d2
commit 0190f9b017

View file

@ -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)