Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Don't move with altcharset or colour set (if y...



details:   https://anonhg.NetBSD.org/src/rev/9b074302582d
branches:  trunk
changeset: 484966:9b074302582d
user:      jdc <jdc%NetBSD.org@localhost>
date:      Sat Apr 15 23:01:15 2000 +0000

description:
Don't move with altcharset or colour set (if you try this on an xterm, you
won't actually move, but will think you have).

diffstat:

 lib/libcurses/refresh.c |  15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r 3647b863db92 -r 9b074302582d lib/libcurses/refresh.c
--- a/lib/libcurses/refresh.c   Sat Apr 15 22:59:05 2000 +0000
+++ b/lib/libcurses/refresh.c   Sat Apr 15 23:01:15 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: refresh.c,v 1.17 2000/04/15 13:17:04 blymn Exp $       */
+/*     $NetBSD: refresh.c,v 1.18 2000/04/15 23:01:15 jdc Exp $ */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)refresh.c  8.7 (Berkeley) 8/13/94";
 #else
-__RCSID("$NetBSD: refresh.c,v 1.17 2000/04/15 13:17:04 blymn Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.18 2000/04/15 23:01:15 jdc Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -786,6 +786,17 @@
                if (OP != NULL && !strcmp(ME, OP))
                        curscr->wattr &= ~__COLOR;
        }
+       if (curscr->wattr & __ALTCHARSET) {
+               tputs(AE, 0, __cputchar);
+               curscr->wattr &= ~__ALTCHARSET;
+       }
+       if (curscr->wattr & __COLOR) {
+               if (OC != NULL && CC == NULL)
+                       tputs(OC, 0, __cputchar);
+               if (OP != NULL)
+                       tputs(OP, 0, __cputchar);
+               curscr->wattr &= ~__COLOR;
+       }
 
        __mvcur(oy, ox, ny, nx, 1);
 }



Home | Main Index | Thread Index | Old Index