summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-03-25 19:31:38 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-03-25 19:31:38 +0000
commitbe67df542b563490e8e74251ad3ad5c99aa0aec2 (patch)
tree0c2930a2391b77ed649386fecaad240bb5d61b19
parent56ff4b760e0a3f9b6c8d00015bbb4810ddab0db7 (diff)
downloadpoezio-be67df542b563490e8e74251ad3ad5c99aa0aec2.tar.gz
poezio-be67df542b563490e8e74251ad3ad5c99aa0aec2.tar.bz2
poezio-be67df542b563490e8e74251ad3ad5c99aa0aec2.tar.xz
poezio-be67df542b563490e8e74251ad3ad5c99aa0aec2.zip
fixes a crash with the input is full
-rw-r--r--src/gui.py1
-rw-r--r--src/window.py6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gui.py b/src/gui.py
index a9c2fa33..7ec1ab73 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -112,7 +112,6 @@ class Gui(object):
def main_loop(self, stdscr):
while 1:
stdscr.leaveok(1)
- self.window.input.win.move(0, self.window.input.pos)
curses.doupdate()
try:
key = stdscr.getkey()
diff --git a/src/window.py b/src/window.py
index f0ce7aad..8dc31096 100644
--- a/src/window.py
+++ b/src/window.py
@@ -28,13 +28,14 @@ class Win(object):
self.height, self.width, self.x, self.y = height, width, x, y
try:
self.win = parent_win.subwin(height, width, y, x)
- self.win.leaveok(1)
except:
# Happens when the C function subwin fails. The man
# doesn't give a reason for this to happen, so I can't
# really fix this.
# just don't crash when this happens.
- pass
+ print parent_win, parent_win.height, parent_win.width, height, width, y, x
+ raise
+ self.win.leaveok(1)
def refresh(self):
self.win.noutrefresh()
@@ -513,6 +514,7 @@ class Window(object):
Resize the whole tabe. i.e. all its sub-windows
"""
self.size = (self.height, self.width) = stdscr.getmaxyx()
+ open('caca', 'a').write(str(self.size))
if self.height < 10 or self.width < 60:
visible = False
else: