From b04021eb2a3999b48348b520a4f71c0a45e898c4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 30 Aug 2008 13:06:15 +0000 Subject: [PATCH] (IT_display_cursor): Write "CURSOR ON/OFF" to termscript only when the state changes. --- src/ChangeLog | 3 +++ src/msdos.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f02db31f0b7..0287a07fe93 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2008-08-30 Eli Zaretskii + * msdos.c (IT_display_cursor): Write "CURSOR ON/OFF" to termscript + only when the state changes. + * w16select.c (Fw16_set_clipboard_data): Don't encode text if clipboard is unavailable. Set dst to NULL if it doesn't point to malloc'ed data. diff --git a/src/msdos.c b/src/msdos.c index 5673c33cb2a..0d46070d5e3 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -1728,17 +1728,19 @@ IT_display_cursor (int on) { 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"); } } -- 2.39.5