Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Fix newterm so it syncs curscr to stdscr when ...



details:   https://anonhg.NetBSD.org/src/rev/9ab67bf375a1
branches:  trunk
changeset: 519795:9ab67bf375a1
user:      blymn <blymn%NetBSD.org@localhost>
date:      Thu Dec 27 10:48:15 2001 +0000

description:
Fix newterm so it syncs curscr to stdscr when term is created.  Thanks
to Onno van der Linden for finding this bug.

diffstat:

 lib/libcurses/screen.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r af877f3cb014 -r 9ab67bf375a1 lib/libcurses/screen.c
--- a/lib/libcurses/screen.c    Thu Dec 27 10:32:23 2001 +0000
+++ b/lib/libcurses/screen.c    Thu Dec 27 10:48:15 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: screen.c,v 1.1 2001/12/02 09:14:22 blymn Exp $ */
+/*     $NetBSD: screen.c,v 1.2 2001/12/27 10:48:15 blymn Exp $ */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)screen.c   8.2 (blymn) 11/27/2001";
 #else
-__RCSID("$NetBSD: screen.c,v 1.1 2001/12/02 09:14:22 blymn Exp $");
+__RCSID("$NetBSD: screen.c,v 1.2 2001/12/27 10:48:15 blymn Exp $");
 #endif
 #endif                                 /* not lint */
 
@@ -164,6 +164,8 @@
                goto error_exit;
        }
 
+       clearok(new_screen->stdscr, 1);
+
        if ((new_screen->__virtscr = __newwin(new_screen, new_screen->LINES,
                                            new_screen->COLS, 0, 0)) == ERR) {
                delwin(new_screen->curscr);
@@ -202,6 +204,7 @@
 #endif
        __startwin(new_screen);
 
+       wrefresh(new_screen->curscr);
        return new_screen;
 
   error_exit:



Home | Main Index | Thread Index | Old Index