diff src/msdos.c @ 97871:bc27b61d82f8

(IT_display_cursor): Write "CURSOR ON/OFF" to termscript only when the state changes.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 30 Aug 2008 13:05:19 +0000
parents f8bd5f0db6f3
children a74660c83709
line wrap: on
line diff
--- a/src/msdos.c	Sat Aug 30 12:32:59 2008 +0000
+++ b/src/msdos.c	Sat Aug 30 13:05:19 2008 +0000
@@ -1728,17 +1728,19 @@
 {
   struct tty_display_info *tty = CURTTY ();
 
-  if (tty->termscript)
-    fprintf (tty->termscript, "\nCURSOR %s", on ? "ON" : "OFF");
   if (on && cursor_cleared)
     {
       ScreenSetCursor (current_pos_Y, current_pos_X);
       cursor_cleared = 0;
+      if (tty->termscript)
+	fprintf (tty->termscript, "\nCURSOR ON");
     }
   else if (!on && !cursor_cleared)
     {
       ScreenSetCursor (-1, -1);
       cursor_cleared = 1;
+      if (tty->termscript)
+	fprintf (tty->termscript, "\nCURSOR OFF");
     }
 }