qemacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemacs-commit] qemacs tty.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs tty.c
Date: Tue, 25 Apr 2017 12:58:46 -0400 (EDT)

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        17/04/25 12:58:46

Modified files:
        .              : tty.c 

Log message:
        tty: hide cursor during redisplay

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/tty.c?cvsroot=qemacs&r1=1.82&r2=1.83

Patches:
Index: tty.c
===================================================================
RCS file: /sources/qemacs/qemacs/tty.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- tty.c       21 Apr 2017 14:44:14 -0000      1.82
+++ tty.c       25 Apr 2017 16:58:46 -0000      1.83
@@ -358,9 +358,9 @@
     TTY_FPRINTF(s->STDOUT, "\033[%d;%dH" "\033[m\033[K", s->height, 1);
     TTY_FPRINTF(s->STDOUT,
                 "\033[?1049l"        /* exit_ca_mode */
-                "\r"                 /* return */
                 "\033[?1l\033>"      /* keypad_local */
-                "\r"                 /* return */
+                "\033[?25h"         /* show cursor */
+                "\r\033[m\033[K"    /* return erase eol */
                );
 #endif
     fflush(s->STDOUT);
@@ -1010,7 +1010,8 @@
     TTYChar *ptr, *ptr1, *ptr2, *ptr3, *ptr4, cc, blankcc;
     int y, shadow, ch, bgcolor, fgcolor, shifted, attr;
 
-    TTY_FPUTS("\033[H\033[0m", s->STDOUT);
+    /* Hide cursor, goto home, reset attributes */
+    TTY_FPUTS("\033[?25l\033[H\033[0m", s->STDOUT);
 
     if (ts->term_code != TERM_CYGWIN) {
         TTY_FPUTS("\033(B\033)0", s->STDOUT);
@@ -1309,7 +1310,7 @@
 
     TTY_FPUTS("\033[0m", s->STDOUT);
     if (ts->cursor_y + 1 >= 0 && ts->cursor_x + 1 >= 0) {
-        TTY_FPRINTF(s->STDOUT, "\033[%d;%dH",
+        TTY_FPRINTF(s->STDOUT, "\033[?25h\033[%d;%dH",
                     ts->cursor_y + 1, ts->cursor_x + 1);
     }
     fflush(s->STDOUT);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]