summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ptyim.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ptyim.c b/ptyim.c
index f6434c8..329e371 100644
--- a/ptyim.c
+++ b/ptyim.c
@@ -81,6 +81,9 @@ void condition_stdin() {
//make it raw
cfmakeraw(&stdin_termio);
tcsetattr(STDIN_FILENO,TCSANOW,&stdin_termio);
+ //move cursor to top left and clear screen
+ write(STDIN_FILENO,"\033[0;0f",6);
+ write(STDIN_FILENO,"\033[2J", 4);
}
void restore_stdin() {
tcsetattr(STDIN_FILENO,TCSANOW,&stdin_termio_bk);