summaryrefslogtreecommitdiff
path: root/src/room.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-06-10 12:56:11 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-06-10 12:56:11 +0000
commitad8d892aa1608dc76e3e29de70911953169b91d3 (patch)
tree91b3cf740593fd4a957350d57568a9a1951c45bc /src/room.py
parent75c058dafc8dc13883168b413d22b31de1638148 (diff)
downloadpoezio-ad8d892aa1608dc76e3e29de70911953169b91d3.tar.gz
poezio-ad8d892aa1608dc76e3e29de70911953169b91d3.tar.bz2
poezio-ad8d892aa1608dc76e3e29de70911953169b91d3.tar.xz
poezio-ad8d892aa1608dc76e3e29de70911953169b91d3.zip
fixed #1106
Diffstat (limited to 'src/room.py')
-rw-r--r--src/room.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/room.py b/src/room.py
index 8dfd63d9..a2b21b58 100644
--- a/src/room.py
+++ b/src/room.py
@@ -40,8 +40,15 @@ class Room(object):
self.window = window
self.pos = 0 # offset
- def scroll_up(self):
+ def scroll_up(self, y_x):
+ y, x = y_x
+ if len(self.messages) <= y:
+ return
self.pos += 14
+ from common import debug
+ debug(str(y_x))
+ if self.pos + y >= len(self.messages):
+ self.pos = len(self.messages) - y+3
def scroll_down(self):
self.pos -= 14