Use ANSI escape sequence to reset and clear terminal, rather than using
the (slow) werase().
This commit is contained in:
parent
edbdce6e3d
commit
e7cc1c6c35
|
@ -5,6 +5,8 @@ unsigned short _COLS = 80;
|
||||||
unsigned short _LINES = 25;
|
unsigned short _LINES = 25;
|
||||||
|
|
||||||
static void ansiscr_init ( struct _curses_screen *scr __unused ) {
|
static void ansiscr_init ( struct _curses_screen *scr __unused ) {
|
||||||
|
/* Reset terminal attributes and clear screen */
|
||||||
|
printf ( "\033[0m\033[2J" );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ansiscr_exit ( struct _curses_screen *scr __unused ) {
|
static void ansiscr_exit ( struct _curses_screen *scr __unused ) {
|
||||||
|
|
|
@ -17,8 +17,6 @@ WINDOW *initscr ( void ) {
|
||||||
stdscr->scr->init( stdscr->scr );
|
stdscr->scr->init( stdscr->scr );
|
||||||
stdscr->height = LINES;
|
stdscr->height = LINES;
|
||||||
stdscr->width = COLS;
|
stdscr->width = COLS;
|
||||||
werase( stdscr );
|
|
||||||
|
|
||||||
return stdscr;
|
return stdscr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue