Not all terminals home the cursor on CSI 2 J
authorH. Peter Anvin <hpa@zytor.com>
Wed, 6 Jun 2007 01:18:50 +0000 (18:18 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 6 Jun 2007 01:18:50 +0000 (18:18 -0700)
Not all terminals home the cursor on CSI 2 J, so send
CSI 2 J CSI H.

com32/modules/printmsg.c

index 80e5231..7368203 100644 (file)
@@ -45,7 +45,7 @@ static int draw_message_file(const char *filename)
     case st_init:
       switch (ch) {
       case '\f':
-       fputs("\033[2J", stdout);
+       fputs("\033[2J\033[H", stdout);
        break;
       case 15:                 /* SI */
        state = st_si_1;