Restore terminal settings after flushing output, not before

This commit is contained in:
Kevin Easton
2017-08-22 22:26:50 +10:00
parent 73148fa4a4
commit 742eeb33f7
2 changed files with 4 additions and 3 deletions

View File

@@ -711,8 +711,6 @@ void term_putchar (unsigned char c)
*/
void term_reset (void)
{
tcsetattr(tty_des, TCSADRAIN, &oldb);
if (current_term->TI_csr)
tputs_x(tparm2(current_term->TI_csr, 0, current_term->TI_lines - 1));
term_gotoxy(0, current_term->TI_lines - 1);
@@ -725,12 +723,13 @@ void term_reset (void)
tputs_x(current_term->TI_smam);
#endif
term_flush();
tcsetattr(tty_des, TCSADRAIN, &oldb);
}
void term_reset2 (void)
{
tcsetattr(tty_des, TCSADRAIN, &oldb);
term_flush();
tcsetattr(tty_des, TCSADRAIN, &oldb);
}
/*