diff options
author | Florent Le Coz <louiz@louiz.org> | 2012-12-15 04:33:20 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2012-12-15 04:33:20 +0100 |
commit | 0190f9b017b93c108fd2d83653f1751871cc8c25 (patch) | |
tree | 981ff0cb847c3b5b4cb0782bb955d9c2f49be2cd /src | |
parent | b23e7751d2b28809a40026e9e2ea7d60add63907 (diff) | |
download | poezio-0190f9b017b93c108fd2d83653f1751871cc8c25.tar.gz poezio-0190f9b017b93c108fd2d83653f1751871cc8c25.tar.bz2 poezio-0190f9b017b93c108fd2d83653f1751871cc8c25.tar.xz poezio-0190f9b017b93c108fd2d83653f1751871cc8c25.zip |
In user lists, the upper line is now the upper most person.
This means you cannot scroll too high.
fix #2180
Diffstat (limited to 'src')
-rw-r--r-- | src/windows.py | 6 |
1 files 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) |