When clearing the screen move the cursor to the top

This commit is contained in:
Andrea Mazzoleni 2016-01-30 09:17:10 +01:00
parent bf1f7dda7c
commit 6da3469fe7
3 changed files with 9 additions and 3 deletions

View file

@ -1228,8 +1228,9 @@ void os_abort(void)
void os_clear(void)
{
/* ANSI code for clear screen */
printf("\033[2J");
/* ANSI codes */
printf("\033[H"); /* cursor at topleft */
printf("\033[2J"); /* clear screen */
}
#endif