Call reset_shell_mode on err
This restores the terminal but doesn't clear the screen, so the error stays visible.master
parent
c18dc35377
commit
09754ed912
6
ui.c
6
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);
|
||||
|
|
Loading…
Reference in New Issue