From 997ee1419d27e15efa9c3a57f2fd77f7e3eb3db3 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Fri, 6 Jul 2018 12:47:54 +0900 Subject: [PATCH] [H is redundant and [u can be moved into the initial write --- apps/ttysize.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/ttysize.c b/apps/ttysize.c index 5ff02bae..c70499f1 100644 --- a/apps/ttysize.c +++ b/apps/ttysize.c @@ -33,7 +33,7 @@ static void divine_size(int * width, int * height) { *width = 80; *height = 24; - fprintf(stderr, "\033[s\033[1000;1000H\033[6n\033[H"); + fprintf(stderr, "\033[s\033[1000;1000H\033[6n\033[u"); fflush(stderr); char buf[1024] = {0}; @@ -56,7 +56,6 @@ static void divine_size(int * width, int * height) { } _done: - fprintf(stderr,"\033[u"); fflush(stderr); set_buffered(); }