Fix for errors that occur before initializing the terminal.

This commit is contained in:
Bruce Hill 2019-11-01 16:46:12 +01:00
parent 66d20ba811
commit 2086cc6598

2
bb.c
View File

@ -147,10 +147,12 @@ void cleanup(void)
free(cmdfilename);
cmdfilename = NULL;
}
if (tty_out) {
fputs(T_OFF(T_ALT_SCREEN) T_ON(T_SHOW_CURSOR), tty_out);
fflush(tty_out);
tcsetattr(fileno(tty_out), TCSANOW, &orig_termios);
}
}
/*
* Returns the color of a file listing, given its mode.