Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Make sure we always update curx, cury and __IS...



details:   https://anonhg.NetBSD.org/src/rev/b46e5d753585
branches:  trunk
changeset: 534848:b46e5d753585
user:      jdc <jdc%NetBSD.org@localhost>
date:      Sun Aug 04 14:13:49 2002 +0000

description:
Make sure we always update curx, cury and __ISPASTEOL.
>From Onno van der Linden in PR lib/16532.

diffstat:

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

diffs (30 lines):

diff -r a5e81ce50b31 -r b46e5d753585 lib/libcurses/clrtoeol.c
--- a/lib/libcurses/clrtoeol.c  Sun Aug 04 14:11:59 2002 +0000
+++ b/lib/libcurses/clrtoeol.c  Sun Aug 04 14:13:49 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clrtoeol.c,v 1.15 2002/01/02 10:38:27 blymn Exp $      */
+/*     $NetBSD: clrtoeol.c,v 1.16 2002/08/04 14:13:49 jdc Exp $        */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)clrtoeol.c 8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: clrtoeol.c,v 1.15 2002/01/02 10:38:27 blymn Exp $");
+__RCSID("$NetBSD: clrtoeol.c,v 1.16 2002/08/04 14:13:49 jdc Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -73,8 +73,11 @@
        x = win->curx;
        if (win->lines[y]->flags & __ISPASTEOL) {
                if (y < win->maxy - 1) {
+                       win->lines[y]->flags &= ~__ISPASTEOL;
                        y++;
                        x = 0;
+                       win->cury = y;
+                       win->curx = x;
                } else
                        return (OK);
        }



Home | Main Index | Thread Index | Old Index