summaryrefslogtreecommitdiff
path: root/asciifarm/client/display/messagepad.py
diff options
context:
space:
mode:
Diffstat (limited to 'asciifarm/client/display/messagepad.py')
-rw-r--r--asciifarm/client/display/messagepad.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/asciifarm/client/display/messagepad.py b/asciifarm/client/display/messagepad.py
index 50d34f5..ab3afab 100644
--- a/asciifarm/client/display/messagepad.py
+++ b/asciifarm/client/display/messagepad.py
@@ -2,7 +2,7 @@
import curses
import textwrap
-class MessagePad:
+class MessagePad():
def __init__(self, maxLines=10):
self.maxLines = maxLines
@@ -16,10 +16,10 @@ class MessagePad:
self.changed = True
def getHeight(self):
- return min(len(self.messages), self.maxLines)
+ return self.maxLines
def update(self, screen, x, y, xmax, ymax):
- if not self.changed and (x, y, xmax, ymax) == self.lastView :
+ if not self.changed and (x, y, xmax, ymax) == self.lastView or xmax <= x or ymax <= y:
return
width = xmax - x
height = ymax - y # should equal self.getHeight()