Call reset_shell_mode on err

This restores the terminal but doesn't clear the screen, so the error
stays visible.
weechat-hashes
C. McEnroe 2020-02-02 02:28:14 -05:00
parent c18dc35377
commit 09754ed912
1 changed files with 6 additions and 0 deletions

6
ui.c
View File

@ -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);