]> granicus.if.org Git - nethack/commit
curses on unix - terminal reset needed after abort
authorPatR <rankin@nethack.org>
Wed, 9 Oct 2019 20:18:34 +0000 (13:18 -0700)
committerPatR <rankin@nethack.org>
Wed, 9 Oct 2019 20:18:34 +0000 (13:18 -0700)
commite4f3559acc2e56eec552ce635f486888364d7e25
treef344edbe8674b4c4d341179281ec9061b793f475
parentbab05ea680c289c0b79228b643a5dd49fbc17cf8
curses on unix - terminal reset needed after abort

Noticed while investigating the message loop.  If I had level files
from an interrupted game and was asked "Destroy old game?" when
starting a new one, answering 'n' left the terminal in an unusable
state.  Executing 'stty sane' (invisibly since input echo was off)
repaired things but the user shouldn't have to do that.

Change unixtty.c's error() to shut down windowing if that has been
initialized.  This might need some tweaking for tty, which will now
clear the screen before showing the startup error message.  Other
systems besides unix use unixtty.c so are affected, but I think the
change doesn't introduce anything that should cause trouble (aside
from the potential screen erasure).
doc/fixes36.3
sys/share/unixtty.c