Commit 621048de authored by louiz’'s avatar louiz’

Cleanly reset curses, so the term is never messed up after an exit

parent 7f6957b9
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment