about summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-02 02:28:14 -0500
committerJune McEnroe <june@causal.agency>2020-02-02 02:28:14 -0500
commit09754ed91243f497065d888d19fc7c3c63ce19a9 (patch)
tree75e2aec37d8532a5f566410801956d45740b277d /ui.c
parentWrap before the very edge of the screen (diff)
downloadtest-09754ed91243f497065d888d19fc7c3c63ce19a9.tar.gz
test-09754ed91243f497065d888d19fc7c3c63ce19a9.zip
Call reset_shell_mode on err
This restores the terminal but doesn't clear the screen, so the error
stays visible.
Diffstat (limited to 'ui.c')
-rw-r--r--ui.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui.c b/ui.c
index 11ee426..90ba726 100644
--- a/ui.c
+++ b/ui.c
@@ -124,6 +124,11 @@ static struct Window *windowFor(size_t id) {
 	return window;
 }
 
+static void errExit(int eval) {
+	(void)eval;
+	reset_shell_mode();
+}
+
 void uiInit(void) {
 	initscr();
 	cbreak();
@@ -131,6 +136,7 @@ void uiInit(void) {
 	termInit();
 	termNoFlow();
 	def_prog_mode();
+	err_set_exit(errExit);
 	colorInit();
 	status = newwin(1, COLS, 0, 0);
 	input = newpad(1, InputCols);
/Makefile?h=2.4&id=a083fdbf454965495468375a7aa9deecdc53b209&follow=1'>Separate tags from all targetJune McEnroe 2019-11-10Filter invite-notifyJune McEnroe 2019-11-10Add capsicum note to READMEJune McEnroe 2019-11-10Filter extended-joinJune McEnroe 2019-11-10Expand client configuration documentation and list capabilitiesJune McEnroe 2019-11-10Request all supported caps from serverJune McEnroe 2019-11-10Filter ACCOUNT, AWAY, CHGHOST for incapable clientsJune McEnroe 2019-11-10Rename listen to localJune McEnroe 2019-11-09Remove extended-join and invite-notifyJune McEnroe 2019-11-09Maintain stateCaps and offer them to clientsJune McEnroe 2019-11-09Parse capabilitiesJune McEnroe 2019-11-09Avoid the reserved _A names with BIT macroJune McEnroe 2019-11-09Define macro for bit flag enumsJune McEnroe 2019-11-08Check that password is hashedJune McEnroe 2019-11-08Avoid calling getopt_long again after it returns -1June McEnroe 2019-11-08Only change AWAY status for registered clientsJune McEnroe 2019-11-07Just write the example normallyJune McEnroe 2019-11-07Include path in readlinkat errorJune McEnroe 2019-11-07Call clientConsume before clientRecvJune McEnroe 2019-11-06Use -l:filename in Linux.mkJune McEnroe 2019-11-06Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe