summaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-01-12 16:53:07 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-01-12 16:53:07 +0100
commit621048dede78e26bdf7431801948380499af4755 (patch)
treed7495b4fb31059eb1c93a52cf5bcdd0f0492b69a /src/core.py
parent7f6957b9063ee09878b5964e66e38d40328113af (diff)
downloadpoezio-621048dede78e26bdf7431801948380499af4755.tar.gz
poezio-621048dede78e26bdf7431801948380499af4755.tar.bz2
poezio-621048dede78e26bdf7431801948380499af4755.tar.xz
poezio-621048dede78e26bdf7431801948380499af4755.zip
Cleanly reset curses, so the term is never messed up after an exit
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core.py b/src/core.py
index dc2bd47b..104a653f 100644
--- a/src/core.py
+++ b/src/core.py
@@ -706,9 +706,10 @@ class Core(object):
Reset terminal capabilities to what they were before ncurses
init
"""
- curses.curs_set(1)
+ log.debug('ALLO, reset_curses')
curses.echo()
curses.nocbreak()
+ curses.curs_set(1)
curses.endwin()
def refresh_window(self):
@@ -1278,6 +1279,7 @@ class Core(object):
self.xmpp.disconnect()
self.running = False
self.reset_curses()
+ sys.exit()
def save_config(self):
"""
@@ -1327,6 +1329,9 @@ class Core(object):
self.information(_("unknown command (%s)") % (command), _('Error'))
def doupdate(self):
+ log.debug('doupdate doupdate')
+ if not self.running:
+ return
self.current_tab().just_before_refresh()
curses.doupdate()