diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-08-04 00:48:50 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-08-04 00:48:50 +0000 |
commit | d364c1f4f3eae87354993b5bfdb952652ee9b44f (patch) | |
tree | 716891c2e34c712673f61b4066910226a9adc2d1 /src/room.py | |
parent | ba08dd43dae400a8df63ecb9a569e3a22160cce2 (diff) | |
download | poezio-d364c1f4f3eae87354993b5bfdb952652ee9b44f.tar.gz poezio-d364c1f4f3eae87354993b5bfdb952652ee9b44f.tar.bz2 poezio-d364c1f4f3eae87354993b5bfdb952652ee9b44f.tar.xz poezio-d364c1f4f3eae87354993b5bfdb952652ee9b44f.zip |
fix the scroll again. The scroll size is now a page - 1 and it handles the multiline message perfectly
Diffstat (limited to 'src/room.py')
-rw-r--r-- | src/room.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/room.py b/src/room.py index b7cb8ed3..0863b209 100644 --- a/src/room.py +++ b/src/room.py @@ -42,13 +42,11 @@ class Room(object): self.window = window self.pos = 0 # offset - def scroll_up(self, y_x, dist=14): - y, x = y_x - if len(self.messages) <= y: - return + def scroll_up(self, dist=14): + # The pos can grow a lot over the top of the number of + # available lines, it will be fixed on the next refresh of the + # screen anyway self.pos += dist - if self.pos + y >= len(self.messages): - self.pos = len(self.messages) - y+3 def scroll_down(self, dist=14): self.pos -= dist |